Default Razor Submission Issues When Deploying to a "Real" Website II

I have this ASP.NET MVC 3 application that works great when developing locally using IIs Express 7.5 or Cassini.
But when I deploy the application to a real website on IIs 7.5 (even on my local dev block), I get scary

View "Index" or its wizard was not found or there is no support for the search engine search queries. The following location searches:
~ / Views / Home / Index.cshtml
~ / Views / Home / Index.vbhtml
~ / Views / Shared / Index.cshtml
~ / Views / Shared / Index.vbhtml

I tried the following: In global.asax.cs , these lines are added to the Application_Start() method to force it to use only the Razor viewer:

 ViewEngines.Engines.Clear(); ViewEngines.Engines.Add(new RazorViewEngine()); 

But to no avail.
I find this error message to be somewhat difficult to fix. Can someone give me some pointers on what to look for?

+4
source share
1 answer

Good, my bad.

First a classic shooting example is asked. (Or vice versa...)

The Home / Index.cshtml for some reason had its creation actions set to None . Installing it on Content solved the problem.

+2
source

All Articles