tags:

views:

891

answers:

4

All of a sudden in this MVC site I have no views that can be found.

The view 'LoginUltraMind' or its master could not be found. The following locations were searched:
~/Views/MyAccount/LoginUltraMind.aspx
~/Views/MyAccount/LoginUltraMind.ascx
~/Views/Shared/LoginUltraMind.aspx
~/Views/Shared/LoginUltraMind.ascx
~/Views/MyAccount/storeNoNav.master
~/Views/Shared/storeNoNav.master

These files definitely exist at these locations -I am looking right at them! I updated to RC 1 yesterday and ran the site fine after that with 0 problems. Today I come back to it and this happens.. grr.....

Any ideas?

A: 

Use fiddler to see exactly what is being requested. It is probably an issue resolving your web application base address.

Otávio Décio
I watch the VS debugger go through the code and the proper controller and function inside the controller is being called by the browser, the return view() is where it throws this error. i watch with fiddler just to be sure though
Slee
+1  A: 

Ended up I had 2 Pages sections in my web.config located in the views directory. I guess when I upgraded I wasn't paying attention and didn't see the previous section. Totally idiot maneuver on my part, but I do wish the error thrown would have told me that instead of a list of files it couldn't find.

Slee
So what exactly did you do to fix this? I have the same problem and I see some entries in the web.config. Advice?
CmdrTallen
A: 

Thanks Max!!! I hosed my web.config in the Views folder, too. I was doing some Castle Windsor stuff and accidentally edited the wrong web.config. >.< Your tip pointed me in the right direction. Thanks!

NovaJoe
A: 

In my case, I had this problem and determined it was caused because I tried to access the 'Model' object on the declaration part of the page (directly on the <script runat="server"> section, outside of the Page Load event). The error raised indicating that the page doesn't exist is completely misleading in this case... Hope this helps others.

Rodolfo G.