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

I am getting this error while I am trying to run my WCF service using HTTPS.
Then I have done the following to resolve my issue.

1 - The Contract Operation method has Operation Behaviour "
      [OperationBehavior(Impersonation=ImpersonationOption.Required)]"

2 - Change the following in the web.config file.
      <system.web>
            ....
            <authentication mode="Windows" />
            .....
     </system.web>

3 - You can also verify that Anonymous Authentication is disabled like in the image below in the IIS.
      Open IIS. Select your application from left side. From right side select "Authentication".
     
     In my case "Windows Authentication" is disabled. Click on the status to enabled.

    Run your application.


Comments