0
我在VisualStudio 2010中創建了一個簡單的WCF服務。我正在使用basicHttpBinding方法。WCF例外:此服務的安全設置需要'匿名'身份驗證
時,我認爲在瀏覽器中的.svc,我收到以下錯誤:
「這項服務的安全設置需要Windows身份驗證,但它沒有爲承載此服務的IIS應用程序啓用。」
我的web.config的樣子,
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpEndpointBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="IAManagement.Service1Behavior"
name="IAManagement.Service1">
<endpoint address="" binding="wsHttpBinding" contract="IAManagement.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="IAManagement.CreateIABehavior"
name="IAManagement.CreateIA">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding"
name="BasicHttpEndpoint" contract="IAManagement.ICreateIA">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="IAManagement.Service1Behavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="IAManagement.CreateIABehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
誰能幫助我在得到這個問題解決了嗎?由於