Four time in four days in four different projects I have received the following error (except different for project name). The projects all work fine while I am building the first couple of forms and then I go to lunch, go home overnight, etc. and then suddenly they throw this error. This last time, all I did was walk away for five minutes to take a leak.
How do I fix and prevent this? I am very new to ASP.NET, so don't know much on how to fix errors of this sort.
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 'PathCertLink.Global'.
Source Error: Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="PathCertLink.Global" Language="C#" %>
Source File: /global.asax Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1055.0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Optimization;
using System.Web.Routing;
using System.Web.Security;
using System.Web.SessionState;
using System.Data.Entity;
using PathCertLink.Models;
using PathCertLink.Logic;
namespace PathCertLink
{
public class Global : HttpApplication
{
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
// Initialize the database.
Database.SetInitializer(new ProductDatabaseInitializer());
// Create the custom role and user.
RoleActions roleActions = new RoleActions();
roleActions.AddUserAndRole();
}
}
}