views:

258

answers:

2

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

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://localhost/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";

    }

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.

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.

EDIT: ANSWER

I finally found what i was looking for.

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

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

Step 2)

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

Uncheck Integrated Windodws Authentication

Step3) Reset IIS

The following two links helped me out!

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

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

+1  A: 

Deploying an IIS-hosted WCF service talks about the .sv file and has a sample one.

Franci Penov
I was hoping to go without the SVC file. Coz then the URL would look a lot cleaner. I have also seen an article that talks about removing the SVC file from the url using URL rewrite rules. But why add the SVC file and then remove when .net 4.0 lets you do it without the SVC file.ONly if i knew how!
ps
+1  A: 

0 down vote accept

I finally found what i was looking for.

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

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

Step 2)

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

Uncheck Integrated Windodws Authentication

Step3) Reset IIS

The following two links helped me out!

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

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

ps