【发布时间】:2011-03-23 00:00:39
【问题描述】:
所以我在 VS2010 上运行带有 .net 4.0 的 iis 7
我有一个 REST wcf 4.0/.net 4.0 服务,它在本地运行得非常漂亮。在我的本地,它托管在 IIS 上
[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 服务。 所有在线帮助(由 google 提供)都在讨论 SVC 文件。 请指出正确的方向。
【问题讨论】: