托管.NET 4.0 REST WCF服务在IIS 6 [英] hosting .net 4.0 REST WCF service in IIS 6

查看:297
本文介绍了托管.NET 4.0 REST WCF服务在IIS 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我在VS2010运行在IIS 7 .NET 4.0

So i am on VS2010 running iis 7 with .net 4.0

我有一个REST WCF 4.0 / .NET 4.0的服务,在本地运行非常漂亮。在我的地方是位于IIS的

I have a REST wcf 4.0/.net 4.0 services that runs locally very beautifully. On my local it is hosted on IIS at

的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)我得到以下错误。

But when i try to deploy it in QA environment (win2k3 .net 4 iis 6) I get the following error.

拒绝目录列表 此虚拟目录不允许的内容列出来。

Directory Listing Denied This Virtual Directory does not allow contents to be listed.

我怎么去呢?而且我不需要在我的本地一个SVC文件运行Web服务。 所有的在线帮助(礼貌谷歌的)谈论SVC文件。 请点我在正确的方向。

How do i go about this? And I don't need a SVC file on my local to run the web service. All the online help (courtesy of google) talk about the SVC file. Please point me in the right direction.

推荐答案

我终于找到了我要找的东西。

I finally found what I was looking for.

步骤1)VirtualDirectoryName->属性 - >虚拟目录选项卡 - > Confirguration按钮 - >

Step 1) VirtualDirectoryName->Properties->Virtual Directory Tab->Confirguration Button->

插入新的通配符映射C:\ WINDOWS \ Microsoft.NET \框架\ v4.0.30319 \ aspnet_isapi.dll的取消选中确认文件是否存在

Insert new WildCard Mapping C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll Uncheck Verify that file exists

步骤2)

VirtualDirectoryName->属性 - >目录安全性选项卡 - >身份验证和访问控制 - >编辑按钮 - >

VirtualDirectoryName->Properties->Directory Security Tab->Authentication and access control->Edit Button->

取消勾选​​集成认证的Windodws

Uncheck Integrated Windodws Authentication

第三步)重置IIS

下面两个链接帮助我!

http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/2ec269e3-c1ff-4d9b-9ff3-d530f1599047

http://forums.asp.net/t/1195663.aspx

这篇关于托管.NET 4.0 REST WCF服务在IIS 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆