I keep getting the following error when I run the project in Visual Studio 10. I got this project from someone else, and I have to expand it, so I’m pretty sure it has something to do with route values, since it came from an another computer. However I don’t know how to do that. It was working before, but then I tried to connect to the database (by creating a new user) and then this started happening.
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'MYAPP.WebUI._Default'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MYAPP.WebUI._Default" %>
Line 2:
Line 3: <%-- Please do not delete this file. It is used to ensure that ASP.NET MVC is activated by IIS when a user makes a "/" request to the server. --%>
Source File: /Default.aspx Line: 1
The Default.aspx.cs file:
public partial class _Default : Page
{
public void Page_Load(object sender, System.EventArgs e)
{
// Change the current path so that the Routing handler can correctly interpret
// the request, then restore the original path so that the OutputCache module
// can correctly process the response (if caching is enabled).
string originalPath = Request.Path;
HttpContext.Current.RewritePath(Request.ApplicationPath, false);
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(HttpContext.Current);
HttpContext.Current.RewritePath(originalPath, false);
}
}
please help.
Solved it. turns out using Chrome web browser, if you log into the mvc app with multiple tabs open, the system gets confused. I started using Internet Explorer, which stops the debugger in Visual Studio automatically preventing this from happening.