Asp.Net MVC Can't Get .html or .xml 404 Error Files?

How to return .html or .xml files located in folders in a view? I am using jquery which requests a static Html file via ajax and inserts the results into a div, and it continues to give the idea of ​​404 error?

thanks

+3
source share
1 answer

If you need to ignore routing for a given path, use:

routes.IgnoreRoute("path/to/static/content");

Also, I may be reading your question incorrectly, but it is a bad idea to put static content in view folders. Create a Content or Publish folder in the root directory.

.html .xml, , "{controller}/{action}/{id}.xml" - .

+8

Source: https://habr.com/ru/post/1704704/


All Articles