ASP. NET MVC Error "The View ' XXX ' or its master is not a found or no view engine support"

Source: Internet
Author: User

From: http://www.dengyukeji.com/archiver/tid-151.html

The error is as follows: The view ' XXX ' or its master is not found or no view engine supports the searched locations.

The following locations were searched:
~/views/xxx/xxx.aspx
~/views/xxx/xxx.ascx
~/views/shared/xxx.aspx
~/views/shared/xxx.ascx
~/views/xxx/xxx.cshtml
~/views/xxx/xxx.vbhtml
~/views/shared/hotgoodslist.cshtml
~/views/shared/hotgoodslist.vbhtml Online comparison of these information;
But you can not find the reason, in fact, the reason is very simple, because you do not find the routing address. The following locations were searched:
~/views/xxx/xxx.aspx
~/views/xxx/xxx.ascx
~/views/shared/xxx.aspx
~/views/shared/xxx.ascx
~/views/xxx/xxx.cshtml
~/views/xxx/xxx.vbhtml
~/views/shared/hotgoodslist.cshtml
~/views/shared/ Hotgoodslist.vbhtml This code means that the following items will be searched, and all requests will be searched at the address below, until a match is found and the error is reported because your route is not found in your view folder.
Solution:
The first thing to check is whether your view is consistent with the action name of the routed address you wrote.
I want to do the project because this name is inconsistent, such as my path is/xxxx/xxxxmanager/xxxcreate
But the file name in my actual view is xxxcraete. To tell the truth, the problem is very difficult to find.
But teach us one way: ~/views/xxx/xxx.aspx
~/views/xxx/xxx.ascx
~/views/shared/xxx.aspx
~/views/shared/xxx.ascx
~/views/xxx/xxx.cshtml
~/views/xxx/xxx.vbhtml
~/views/shared/hotgoodslist.cshtml
~/views/shared/hotgoodslist.vbhtml is to follow this address to your view folder to find it again, to see if it is not caused by, it can be.
In fact, you have to check the routing configuration is not written well. This I have not met, have met a friend please tell me.

Today, when the project was released to IIS, this problem, the workaround :/views/xxx/The lack of xxx.cshtml files, directly to the computer's xxx.cshtml files copied to the bottom of IIS can be .

ASP. NET MVC Error "The View ' XXX ' or its master is not a found or no view engine support"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.