在IIS 6中托管.net 4.0 REST WCF服务
所以我在VS2010上使用.net 4.0运行iis 7
我有一个REST wcf 4.0 / .net 4.0服务,本地运行非常漂亮。 在我的本地,它托管在IIS上
HTTP://本地主机/ SOMENAME /
[WebGet(UriTemplate = "Ping")] public string CheckAuthenticatedStatus() { string userName; if (!AuthenticateUser(out userName)) { WebOperationContext.Current.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.Unauthorized; return "Authenticaltion Failed"; } return "Ping Back - " + userName; } [WebGet(UriTemplate = "AnonymousPing")] public string CheckStatus() { return "AnonymousPing Back"; }
但是当我尝试在QA环境中部署它时(win2k3 .net 4 iis 6)我得到以下错误。
目录列表被拒绝此虚拟目录不允许列出内容。
我该怎么做? 我本地不需要SVC文件来运行Web服务。 所有在线帮助(由谷歌提供)都谈论SVC文件。 请指出我正确的方向。
我终于找到了我想要的东西。
步骤1)VirtualDirectoryName-> Properties-> Virtual Directory选项卡 – > Confirguration按钮 – >
插入新的WildCard映射C:\ WINDOWS \ Microsoft.NET \ Framework \ v4.0.30319 \ aspnet_isapi.dll取消选中validation文件是否存在
第2步)
VirtualDirectoryName-> Properties-> Directory Security选项卡 – > Authentication and access control-> Edit Button->
取消选中Integrated Windodws身份validation
Step3)重置IIS
以下两个链接帮助了我!
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/2ec269e3-c1ff-4d9b-9ff3-d530f1599047
这是一篇关于IIS6上的WCF RESTfull服务托管的post。 WCF-REST类型服务-ON-IIS6和耗时逐jquery的