I want to ignore the routing when browse a specific page in the Views folder, I unsuccessfully attempted that by use :
routes.RouteExistingFiles = false;
routes.IgnoreRoute("Views/NoMove/specificPage.cshtml");
But above didn't work, because the Internet browser ask me to download the file and it doesn't open/process it the page!
What is the problem please, and How to fix it!
You'll need to add an entry in your web.config.
Check the appSettings
section
add this (or update)
<add key="webpages:Enabled" value="true" />
The entry is probably there already, so just update the value from false to true.
They are 2 web.config files though .. one in the root of your app and another in the views folder .. you may need to add/update the entry on both.
The default value (false
) prevents *.cshtml
and *.vbhtml
files from being accessed directly from the browser.
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