當我主持在IIS Developer Express公司的「WCF 4 REST服務模板」項目(從模板)我得到以下幾點:WCF 4 REST服務上的IIS Developer Express公司,身份驗證問題
IIS指定的認證方案'IntegratedWindowsAuthentication,Anonymous',但綁定只支持完全一個認證方案的規範。有效的認證方案是摘要,協商,NTLM,基本或匿名。更改IIS設置,以便只使用單個身份驗證方案。
我並沒有改變任何配置明確等,以返回JSON不是設置automaticFormatSelectionEnabled爲false:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<standardEndpoints>
<webHttpEndpoint>
<!--Configure the WCF REST service base address via the global.asax.cs file and the default endpoint
via the attributes on the <standardEndpoint> element below-->
<standardEndpoint name=""
helpEnabled="true"
automaticFormatSelectionEnabled="false"
/>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
如果沒有設定明確的端點配置是問題,那麼我會怎麼做對於這種服務,爲了明確地設置服務的身份驗證方案以避免iis開發人員表達此問題?
注:我有以下組件Microsoft.Web.dll & Microsoft.Web.Administration.dll在Web服務項目,在這裏hopsting WCF服務的解決方法描述應用程序的/bin中文件夾在問題團隊博客上: http://blogs.iis.net/vaidyg/archive/2010/07/21/wcf-workaround-for-webmatrix-beta.aspx