"You do not have permission to view this directory or page." on IIS7.5 with ASP.NET MVC4

I built my site in ASP.NET MVC 4 in Visual Studio 2012. Then I created a publishing profile and used FTP as my publishing method, I published it in the correct directory on my Windows Server 2008 R2.

I registered on the server and checked that all files were uploaded.

But still, when I browse the site, I get:

You do not have permission to view this directory or page.

How can I fix this problem? my site works great on Localhost.

Thanks.

+4
source share
1 answer

Sometimes this can happen when you have two or more sites in IIS with the same port number, and when you published the site, you forgot to switch ftp to your target site. In this case, you just need to enable your ftp and try to publish it again. If not:

You can go to the folder on your server where the site was published and change the permissions:

Right click on folder -> Properties -> Security - >Edit 

You must set permissions for IIS_IUSRS and Users to allow read and write IIS_IUSRS . If they do not exist, add them and set permissions.

+1
source

Source: https://habr.com/ru/post/1498839/


All Articles