0

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.

chararray
  • 79
  • 1
  • 12
  • Check your targetFramework; I also wonder if Framework is registered on IIS8; Is IIs8 installed before or after framework installation? – techspider Apr 29 '16 at 20:50
  • check solutions posted on http://stackoverflow.com/questions/2005747/could-not-load-type-namespace-global-causing-me-grief and http://stackoverflow.com/questions/54001/could-not-load-type-xxx-global and http://stackoverflow.com/questions/11682216/parser-error-message-could-not-load-type-in-global-asax – techspider Apr 29 '16 at 20:54
  • I'm not sure if the framework was installed before or after IIS, but it runs other apps with different frameworks alright. Both 2.0 and 4.0 – chararray May 06 '16 at 00:52
  • @techspider I did reinstall/register Framework with IIS8, that did not fix the issue either. I have tried going through each of the suggested solutions as well with no luck :( – chararray May 09 '16 at 19:35

1 Answers1

1

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

Try setting it to just "bin"

Joel Gallagher
  • 462
  • 8
  • 17