9

I built my site in ASP.NET MVC 4 in Visual Studio 2012. I then created a publish profile and using FTP as my method of publishing, I published to the correct directory on my Windows Server 2008 R2.

I have logged into the Server and checked that all files have been uploaded, they have.

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

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

How can I fix this issue? my site works fine on Localhost.

Thank You.

J86
  • 14,345
  • 47
  • 130
  • 228
  • 1
    Does this answer help: http://stackoverflow.com/a/12653278, also make sure the hotfix (http://support.microsoft.com/kb/980368) mentioned is installed on your server. – Kev Aug 25 '13 at 20:27
  • Thanks Kev. That update (hotifx) did it. Can you reply as Answer, so that I mark yours as Answer. – J86 Aug 27 '13 at 13:04
  • Excellent, glad that worked. I'll just get the mods to close as duplicate because that's the correct procedure if another answer helped solve this. – Kev Aug 27 '13 at 14:33

1 Answers1

7

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

You may navigate to a folder on your server, where the site was published and modify the permissions:

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

You should set rights for IIS_IUSRS and Users to allow read and write. If they don't exists add them and set the rights.

Arminder Dahul
  • 194
  • 5
  • 23
Andrey Gubal
  • 3,481
  • 2
  • 18
  • 21
  • Hi Andre. I am not sure about the FTP suggestion, I uploaded the files to the correct sub-directory of wwwroot, and I have logged into my server and checked that the files have indeed been uploaded. Also I checked the permissions, and the two user groups you mentioned have read / execute rights. – J86 Aug 27 '13 at 09:50