title: REST on IIS 7.5 - IIS specified authentication schemes Exception
body: <p>First, the Service is working correctly on a Server 2008 environment with IIS 7.5. Same Service on a Windows 7/IIS 7.5 environment shows the following error:</p>
  
  <pre><code>[InvalidOperationException: IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.]
     System.ServiceModel.Web.WebServiceHost.SetBindingCredentialBasedOnHostedEnvironment(ServiceEndpoint serviceEndpoint, AuthenticationSchemes supportedSchemes) +349683
     System.ServiceModel.Web.WebServiceHost.AddAutomaticWebHttpBindingEndpoints(ServiceHost host, IDictionary`2 implementedContracts, String multipleContractsErrorMessage, String standardEndpointKind) +806
     System.ServiceModel.Web.WebServiceHost.OnOpening() +244
     System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +274
     System.ServiceModel.Channels.CommunicationObject.Open() +36
     System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +184
     System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +615
  
  [ServiceActivationException: The service '/IMonSapService' cannot be activated due to an exception during compilation.  The exception message is: IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used..]
     System.Runtime.AsyncResult.End(IAsyncResult result) +687598
     System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190
     System.ServiceModel.Activation.AspNetRouteServiceHttpHandler.EndProcessRequest(IAsyncResult result) +6
     System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +96
  </code></pre>
  
  <p>I have the following line in my Global.asax.cs</p>
  
  <pre><code>RouteTable.Routes.Add(new ServiceRoute("IMonSapService", new WebServiceHostFactory(),
                      typeof(IMonSapService)));
  </code></pre>
  
  <p>Here the first lines of the Service implementation</p>
  
  <pre><code>[AspNetCompatibilityRequirements
      (RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
  [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
  public class IMonSapService : IIMonSapService
  {
  ...
  }
  </code></pre>
  
  <p>My web.config looks like this</p>
  
  <pre><code> &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
      &lt;httpRuntime /&gt;
    &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;
      &lt;standardEndpoints&gt;
        &lt;webHttpEndpoint&gt;
          &lt;standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" /&gt;
        &lt;/webHttpEndpoint&gt;
      &lt;/standardEndpoints&gt;
    &lt;/system.serviceModel&gt;
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
      &lt;directoryBrowse enabled="true" /&gt;
    &lt;/system.webServer&gt;
  </code></pre>
  
  <p>I compared the two IIS instances but I didn't found a difference.</p>