Global.asax parser errors when deploying MVC 1 app to remote server

So, we are having trouble deploying an ASP.NET MVC application to a client site. Basically, when we try to test the app from localhost, we get a terrible Global.asax parser error indicating that it cannot load the global app.

Research shows that there are mainly 4 reasons for this exception:

  • No solution has been created. This is clearly not the case as we can deploy it here and it works great on any machine we deploy and we had to build and publish the damn thing to deploy it anyway.

  • Inheritance of the Global.asax namespace does not match the global application code file. Again we double-checked this and since it works very well this might not be a problem.

  • Miscellaneous without IIS / VS.NET description. Basically something happens in IIS or VS.NET and the webserver won't behave correctly for that application. We did a cleanup and restore, we deleted the virtual directory and recreated and performed all the IIS settings that we found elsewhere on the Internet. Various combinations of IIS bounce, servers reboot, virtual directory / application, etc.

  • Code-level rights issues. We have fully trusted the file / web config directory in the framework directory, we have established that .NET has been trusted completely in IIS, we have given everyone full directory control to hit it with a security hammer, etc. Etc..

Relevant detials: Windows Server 2008 x64 IIS 7, 32-bit compatible application pool (the application was written on a 32-bit OS, compiled for any processor) Application pool ID set in NetworkService Microsoft ASP.NET MVC 1.0 Deployment XCopy

We have deployed another read-only application. The major difference in this application is the use of NHibernate and Log4Net, which require full trust. Also, the actual project name of the web project is different from the default namespace, however, the Inherits namespace in the Global.asax and Global.asax.cs files matches, so this shouldn't be a problem.

Anyone have any bright ideas? We've officially gotten dull.

EDIT The exception is Could not load type <MyDefaultNamespace>.<Global.asax.cs class name>

The code snippet is missing because the app doesn't load at all. It doesn't work immediately, without the first request delay after installation.

This is the same as all these people here have problems with

+2


a source to share


2 answers


If you changed the solution platform, try changing it to Any CPU .



I had my x86 installed (the one I created to modify the code while debugging on an x64 machine). When I changed it to Any CPU, the problem you described was gone.

+3


a source


Exception: "Failed to load type <MyDefaultNamespace>.<Global.asax.cs class name>

"

The code snippet is missing because the app doesn't load at all. It doesn't work immediately, without the first request delay after installation.



This is the same as all these people here have problems with

0


a source







All Articles