0

I have built a ASP.NET MVC site and deployed it successfully on the same machine where I have built it (with Visual studio).

Now I am trying to deploy the site on a different machine, and I just can't get it running. I have copied the whole project on the new machine and set up the project in IIS. Now when I try to access the website I get the message that the view I am trying to access can't be found (I am getting this error for every View). It looks like this: enter image description here

But all of my views are in the "Views" folder (this particular Login view is under Views/Account/Login.cshtml)

Does anybody know what I am supposed to do so that IIS (8) is able to find/access my views ?

Edit:

Structure in IIS enter image description here

user3466562
  • 465
  • 2
  • 10
  • 23
  • 1
    is it like this post http://stackoverflow.com/questions/21470338/asp-net-mvc-deployed-application-cant-find-views-http-403 – Alan Tsai Aug 11 '15 at 01:11
  • Can you show what the folder structure looks like under the website in IIS? – Casey Aug 11 '15 at 02:04
  • sure your view directory is in the application root directory? – chenZ Aug 11 '15 at 07:49
  • I have edit my question and posted the project structure in IIS – user3466562 Aug 11 '15 at 08:16
  • maybe I have to set something in visual studio while building the project ? As I said, I just copied the whole project on the new machine (this same data structure is running on the machine with visual studio, I have published it to iis and there I don't get this error) – user3466562 Aug 11 '15 at 08:40
  • 1
    can you try set the root dir secure to everyone?there are files in harddis but program say not exsit,maybe it's a secure problem – chenZ Aug 11 '15 at 08:47
  • That was it :) I find it quite confusing because I have set to run the application with my user (which has admin rights on the machine). After setting the security access to "Everyone" I can access the views and my application is being loaded properly. Thanks One more question, do I need to copy the whole project or do I need just some of the folders ? – user3466562 Aug 11 '15 at 08:58

0 Answers0