Patrick Desjardins
Patrick Desjardins

Reputation: 141023

WCF Access is denied with IIS

I created a brand new WCF web application with .NET 4.5.1

I have set in IIS the Authentication to Anonymous Authentication (enabled). All the other options are disabled. The web site in IIS is set to its own application pool which run under my credential. I am the administrator of the machine. The application pool is set to use version 4.

The url is

http://localhost:8885/Service1.svc 

The port is good.

If I use the Process Monitoring I see this output for w3wp.exe:

enter image description here

Full Size here

Why do I get a 401 error, if I have the read-write access (the app pool is running my account)?

Server Error in '/' Application. Access is denied. Description: An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.

Error message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to 'C:\Users\Patrick\Documents\Visual Studio 2013\Projects\MyServiceA\MyServiceA\Service1.svc'.

Upvotes: 0

Views: 4321

Answers (1)

Patrick Desjardins
Patrick Desjardins

Reputation: 141023

To make it works, you have to create a website in IIS and inside Visual Studio, in the property of the project, you add a virtual directory.

enter image description here

After, if you go into IIS, you will see an application added to your website.

enter image description here

From here you can access your WCF services

http://localhost:8885/MyServiceA/Service1.svc

Upvotes: 2

Related Questions