2008年3月20日 星期四

此服務的安全性設定需要 Windows 驗證,但裝載此服務的 IIS 應用程式未啟用該驗證

在本機(Vista) 開發 WCF程式 ok 後,部署到 windows server 2003 後,存取 http://server/virdir/service.svc時 發生錯誤 此服務的安全性設定需要 Windows 驗證,但裝載此服務的 IIS 應用程式未啟用該驗證。 堆疊追蹤: [NotSupportedException: 此服務的安全性設定需要 Windows 驗證,但裝載此服務的 IIS 應用程式未啟用該驗證。] System.ServiceModel.Channels.HttpChannelListener.ApplyHostedContext(VirtualPathExtension virtualPathExtension, Boolean isMetadataListener) +4074379 System.ServiceModel.Activation.VirtualPathExtension.ApplyHostedContext(TransportChannelListener listener, BindingContext context) +71 ... 不知道該怎麼辦? 英文的字是這樣寫的 Security settings for this service require Windows Authentication but it isnot enabled for the IIS application that hosts this service 經google 大師指點後,查到 http://blogs.msdn.com/appsec/ in this case you will need to set windows authentication and change the iis metabase manualy On your IIS server, start Notepad, and then open the \system32\inetsrv\Metabase.xml file located on the hard disk. In the section, locate the following line: NTAuthenticationProviders="NTLM" Modify the line so that it reads exactly as follows: NTAuthenticationProviders="Negotiate,NTLM" Check also the attribute of the solution vdir at the metabse.xml. 但好像還是不夠啊!

沒有留言:

Share with Facebook