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();
        }
    }
}
7
  • Can you post screenshot of directory layout for the files including PathCertLink.Global"? Commented May 10, 2016 at 19:16
  • is Global class part of the PathCertLink namespace? Check global.asax.cs Commented May 10, 2016 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. Commented May 10, 2016 at 19:57
  • trying to add screen shot,,, Commented May 11, 2016 at 12:22
  • I cannot get this system to accept my code, even when following the instructions and indenting code?????? Commented May 11, 2016 at 12:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.