I created MVC 5 application from template 2013 VS. If I run it from VS it works.

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

than I created new site using this pool

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

My folder contains views

My feautures is set like this:

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

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.
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

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

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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With