chararray
chararray

Reputation: 89

How to fix Global.asax.cs parser error in IIS 8?

I am migrating a web application from IIS 7 to IIS 8 and am encountering the following 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 'MyAppName.Global'.

Line 1:  <%@ Application Codebehind="Global.asax.cs" Inherits="MyAppName.Global" Language="C#" %>

The app compiles and runs perfectly on IIS 7. I have the app pool configured the same on IIS 8 as it was on IIS 7, but the app doesn't want to compile for me. I have tried to remove the "Inherits" however this just sends me down a rabbit hole of errors. It also looks like my app's .dlls are in the bin folder where they should be. I don't appear to be missing any dependencies either.

Also, for what it's worth, this web app works when I run it on my local machine using Visual Studio 2010 but breaks when I use Visual Studio 2013 or higher with the Global.asax.cs error.

Upvotes: 0

Views: 1942

Answers (1)

Joel Gallagher
Joel Gallagher

Reputation: 472

My projects outputpath had been set to "bin/debug"

Try setting it to just "bin"

Upvotes: 1

Related Questions