none
WCF needs authentication - no endpoint listening... 404 not found RRS feed

  • Question

  • Hi,

    I am working on a WCF that will be hosted with IIS in our network. It will be consumed externally. It will need credential to not be used by everybody.

    The service worked fine when consumed in our network. However, There is problem while consumed externally, even through the service and wsdl (by adding ?wsdl) work.

    <system.serviceModel>
    <bindings>
      <basicHttpBinding>
       <binding name="basicHttpBinding_IMgmtService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
          <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="TransportWithMessageCredential">
            <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
            <message clientCredentialType="UserName"  algorithmSuite="Default" />
          </security>
      </basicHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="ManagementService.MgmtBehavior" name="ManagementService.WebService">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding_IMgmtService" name="HttpExtern" contract="ManagementService.IWebService" />
        <endpoint address = "mex" binding = "mexHttpsBinding" contract = "IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ManagementService.MgmtBehavior">
          <serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100" maxConcurrentInstances="100" />
          <serviceMetadata httpsGetEnabled="true" httpGetEnabled="true"/> 
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <serviceCredentials>
            <userNameAuthentication
                 userNamePasswordValidationMode="Custom"
                 customUserNamePasswordValidatorType="ManagementService.UserAuthentication,ManagementService"/>
          </serviceCredentials>
        </behavior>
      </serviceBehaviors>
    </behaviors>

    Why does it work internally but not externally?

    Why do I need to add httpGetEnabled="true" in order to see the wsdl externally, but it's working fine internally, even through I use https (internally and externally, and use httpGetEnabled...)

    It returns the exception no endpoint listening... 404 not found :(


    Tuesday, May 28, 2013 7:13 PM

Answers

All replies