Debugging an ASP.NET MVC site and ASP.NET MVC Source Code
I have been given an app written by someone el开发者_JAVA百科se and the error I get when I try to just launch the thing and the first look at it is:
"There is no source code available for the current location."
I could care less about the source code to ASP.NET MVC. How do I tell my project to show me the location where it is breaking in "my" code?
Update:
The message I get after this initial error is "no controller named ~"After all this the app still works. Its just really slow. Any ideas?
Each page request goes through this cycle in debug mode.This is going to be a routing issue. Can you please post the RegisterRoutes method in the Global.asax?
If it is using the default, then a request is being made to http://sitelocation/~/somethingelsehere.
My guess is there is a reference to a url like "~/Public/default.aspx".
Some basic things to check:
- The MVC is the startup project
- The Default.aspx is the startup page
Edit:
What does the Global.asx.cs page look like? Can you post some code? I am wondering if it's somewhere in the routing...
精彩评论