3

I created MVC 5 application from template 2013 VS. If I run it from VS it works. enter image description here

I used publish and file deploy to my folder and on IIS I setup new pool: v4, integrated.

enter image description here

than I created new site using this pool

enter image description here

I restart IIS but if I run app I get error which is saying that it can't find my Views.

enter image description here

My folder contains views

enter image description here

My feautures is set like this:

enter image description here

I have problem with MVC 4 also but I get page like this.

enter image description here

In my RouteConfig.cs is this coud:

namespace MVC5
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}

Maybe my feutures are not set good for IIS feautures but I'm lost with this. Thanks for any help.

tonco
  • 1,281
  • 3
  • 16
  • 30

3 Answers3

9

I believe the correct answer should be to give the user IIS_IUSRS full permission into your web folder, mvc5 in your case

IIS_IUSRS is the group for IIS Worker Process Accounts

See this answer for more info

enter image description here

and then sure that the application is using an application pool using the apppoolidentity

enter image description here

enter image description here

Community
  • 1
  • 1
Frank Fu
  • 3,483
  • 2
  • 28
  • 38
5

Finaly I found where was my problem.

Path to my deployed folder was: "C:\Users\Anton\Downloads\MVC5d"

But probably IIS is not happy with path located in folder "Users".

I moved it into "C:\MyProjects\MVC5d" and everything is working now.

tonco
  • 1,281
  • 3
  • 16
  • 30
-3

Your steps looks good - I don't see any problem. Try it on different pc or reinstall win.

Keri Marr
  • 407
  • 2
  • 6
  • 13