Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to set up a RestFul service on IIS, my working environment is Visual Studio, C #. In my solution I have two separate projects, one for a REST service and the other for a WCF service, they are managed by the same Proxy; the proxy connects to IIS.

I added my REST service on IIS.
On IIS I had already loaded WCF service and everything was ok: when browsing the site from IIS it opens the browser and redirects to localhost / WCFService /? Wsdl and I see the Parent Directory with all the files of the WCF service project.

But when I try to browse the REST service, it redirects me to localhost: 8080
instead than localhost:8080/RESTSErvice/ (8080 is the port I assigned to the RESTService, while WCF has 80 by default) and the resulting page gives me error 401.3:

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: \ FolderNameSolution \ RESTServiceProject'.

Version Information: Microsoft .NET Framework Version: 4.0.30319; ASP.NET Version: 4.8.4250.0


If I test the settings (on IIS -> Basic Settings -> test settings -> test connections) both Authentication and Authorization are ok, and with respect to the permissions "the path is accessible".

So I thought that the problem is not the webconfig inside the RestService project but I should change the way IIS manages the requests to the browser, what do you think? If so, what should I change and where?

WCF service and Rest sevice have two different ports, as I wrote: did I do it right?

What I have tried:

I created other applications/websites on IIS for the same REST project (they don't run simultaneously), by changing the following:

1) I assigned the same application pool to both WCF and REST service but I got the same error.

2) I created both a new application (under default Web site) and a new website for the same RestProject but nothing changed.

3) I changed the port but I got an error because the 80 port is used by the WCF service.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900