RSolberg
RSolberg

Reputation: 26972

Security settings for this service require Windows Authentication

I have an ASP.NET MVC site that contains a WCF SVC that is hosted on load balanced intranet site (2 servers). It is my understanding that for security reasons, our web server team does not allow anonymous authentication to our intranet web applications and the default is to use Windows authentication. I can access the SVC just fine on localhost, but when trying to access on the server I get the following error message:

System.NotSupportedException: Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service.

I've found similar questions here on StackOverflow and the answers given didn't solve my specific issues. Here is my current web.config for the service areas...

<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
    <client />
    <bindings>
      <basicHttpBinding>
        <binding name="basicHttpBinding_IClarityIntegration">
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ClarityIntegrationBehavior">
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="ClarityIntegrationBehavior"
        name="ClarityIntegration.MVC.Web.Services.ClarityIntegration">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding_IClarityIntegration"
          contract="ClarityIntegration.MVC.Web.Services.IClarityIntegration">
        </endpoint>
      </service>
    </services>
  </system.serviceModel>

Upvotes: 1

Views: 3350

Answers (1)

RSolberg
RSolberg

Reputation: 26972

This issue was actually being caused by an exception within the WCF service itself. Not sure why it ended up responding this way, but after finding the exception and fixing it, this problem went away.

Upvotes: 1

Related Questions