Allow *.css, *.js and *.html from the MVC 5 Views map

 

If you want to allow static content to be served from the asp .net MVC 5 views folder, just added the web.config in this folder and change path=”*” to path=”*.cshtml”.

https://stackoverflow.com/questions/17949460/how-do-you-request-static-html-files-under-the-views-folder-in-asp-net-mvc

 

<system.webServer>

<handlers>

<remove
name=BlockViewHandler/>

<add
name=BlockViewHandler
path=*.cshtml
verb=*
preCondition=integratedMode
type=System.Web.HttpNotFoundHandler />

</handlers>

</system.webServer>

Leave a Reply

Your email address will not be published. Required fields are marked *