iis-7 – 在IIS 7.5上为使用Windows身份验证的ASHX处理程序启用P
我有一个ASP.NET(.NET 4)网站,它使用http PUT作为.ashx通用处理程序. PUT调用源自Silverlight前端.所有在我的本地计算机(Cassini Web服务器)上的VS 2010中工作.
然后我部署到IIS7.5 Win Server 2008 R2框. silverlight / website很好,但是对.ashx处理程序的PUT调用遇到了Windows登录提示符. 然后我读到了这个:http://blogs.msdn.com/b/joseph_fultz/archive/2009/07/23/enabling-the-put-verb-with-handlers-and-iis-7-0.aspx 我已经按照他的建议,我现在可以通过我的.ashx处理程序进行PUT调用.问题是只有Web服务器的Administrators组中的人才能执行此操作.没人能.他们遇到了Windows登录提示. 知道这可能是什么? 我无法在网络服务器上给公司管理员权限.毫无疑问,他们会切断我的一只手,在我面前吃手,然后告诉我门.
好吧我明白了.
以下是IIS 7.5中的关键配置元素: >在Windows身份验证/提供程序下 – NTLM必须位于Negotiate之上 <security> <authorization> <remove users="*" roles="" verbs="" /> <add accessType="Allow" users="*" verbs="GET,HEAD,POST,PUT,DELETE,DEBUG" /> </authorization> </security> (我会减少一点,但现在它的工作原理) 我的整个system.webServer元素如下: <system.webServer> <modules> <remove name="WebDAVModule" /> </modules> <defaultDocument> <files> <clear /> <add value="default.aspx" /> </files> </defaultDocument> <handlers accessPolicy="Read,Write,Execute,Script"> <remove name="WebDAV" /> <remove name="SimpleHandlerFactory-Integrated-4.0" /> <remove name="SimpleHandlerFactory-Integrated" /> <add name="SimpleHandlerFactory-Integrated" path="*.ashx" verb="GET,DEBUG,PUT" type="System.Web.UI.SimpleHandlerFactory" resourceType="Unspecified" requireAccess="Write" preCondition="integratedMode" /> <add name="SimpleHandlerFactory-Integrated-4.0" path="*.ashx" verb="GET,PUT" type="System.Web.UI.SimpleHandlerFactory" resourceType="Unspecified" requireAccess="Write" preCondition="integratedMode,runtimeVersionv4.0" /> </handlers> <security> <authorization> <remove users="*" roles="" verbs="" /> <add accessType="Allow" users="*" verbs="GET,DEBUG" /> </authorization> </security> </system.webServer> 这样做了. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |