Hello Guys I'm new here I'm Dany. Lets talk about my Issue. I've built a simple test project in Visual Studio 2015 Basically I'm testing Razor But I'm unable to make it run. I upload all my project. Then I use Web Application Tools to Install as web App. Then I go to my Site www.mysite.com/test.cshtml but I always get redirected to www.mysite.com/Error.aspx?aspxerrorpath=/test.cshtml Could someone point me to the right direction. Simple code I'm trying to run Code: @{ Response.Write("Hello World"); } I think I'm using Windows 2012 - IIS 8.0 Net 4.x Best Regards
To get the real error message you must disable custom error mode. Otherwise you will get redirect to the Error.aspx page. I suspect the .cshtml file isn't running because or our request filtering module is preventing the page from displaying because cshtml files are protected by default by our server. This is because those type of pages usually contain sensitive code. You might be missing a dll file in your project deployment thus leading to this issue you're having. Make sure you use the option "Copy local to True". This will make sure all of your dll files get deployed.