It seems that MVC3 has a priority handler for .cshtml and .vbhtml file extensions and tries to locate them in the default folder.
When requesting these URLs:
MVC always looks for these specific static files in a default folder.
Regardless of the extension or the route, I want it to completely ignore the .cshtml & .vbhtml handling and just pass the full URL through like all other URLs so I can take care of the routing on my own (with Nancy).
Running MVC3+Nancy+Razor on IIS 7.5 on an Azure instance.
Add
<configuration>
<appSettings>
<add key="webPages:Enabled" value="false" />
</appSettings>
</configuration>
to your web.config. Starting with the next version of Nancy (0.10), the Razor engine will automatically add this to the web.config
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