发布Restful服务时出现IIS 指定了身份验证方案错误时的解决方案

RESTful

发布RESTful服务,当访问.svc文件时出现如下错误时:

IIS 指定了身份验证方案“IntegratedWindowsAuthentication, Anonymous”,但绑定仅支持一种身份验证的规范。有效的身份验证方案为摘要、协商、NTLM、基本或匿名。请更改 IIS 设置,以便仅使用单一的身份验证方案。

(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. )

原因是由于磁盘是NTFS格式需要给定权限,解决办法是去掉svc文件的集成windows身份验证,或者将iis匿名访问帐户给定权限。

RESTful