0

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();
        }
    }
}
Brent Oliver
  • 171
  • 3
  • 21
  • Can you post screenshot of directory layout for the files including PathCertLink.Global"? – SirH May 10 '16 at 19:16
  • is Global class part of the PathCertLink namespace? Check global.asax.cs – dfdsfdsfsdf May 10 '16 at 19:30
  • Has anything been deleted from your bin directory? There should probably be a file in the bin directory called PathCertLink.dll (or whatever name has been specified.) It sounds like that file is missing. – Scott Hannen May 10 '16 at 19:57
  • trying to add screen shot,,, – Brent Oliver May 11 '16 at 12:22
  • I cannot get this system to accept my code, even when following the instructions and indenting code?????? – Brent Oliver May 11 '16 at 12:28
  • Got code accepted finally. I have tried the fix of creating virtual directory from this question,,, but does not work, or else I am going something wrong: http://stackoverflow.com/questions/11596352/parser-error-server-error-in-application – Brent Oliver May 11 '16 at 12:42
  • I have given up on repairing this, and recreated the project (again) and am making sure to backup all the project data multiple times a day to hopefully be able to recover when it happens again. – Brent Oliver May 12 '16 at 13:27

0 Answers0