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



حمایت از ما | مشهدهاست

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


حمایت از ما | مشهدهاست

حمایت از ما | مشهدهاست حمایت از ما | مشهدهاست

حمایت از ما | مشهدهاست
`

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



asked

6 years ago

viewed

1629 times

active

6 years ago


So we're having some issues deploying an ASP.NET MVC app to a client site. Basically when we try to test the app from localhost, we get the dreaded Global.asax parser error indicating it could not load the application global.

Research indicates there are basically 4 possible reasons for this exception we're seeing:

  1. The solution hasn't been built. This clearly isn't the case since we can deploy it here and it runs fine on any machine we deploy to AND we had to build and publish the darn thing to deploy it anyway.

  2. The Global.asax namespace inheritance does not match the application global code file. Again we double checked this and since it runs just fine here that can't be the issue.

  3. Miscellaneous non-descript IIS/VS.NET mischief. Basically something get's wonky in IIS or VS.NET and the web server won't behave correctly for this application. We've done cleans and rebuilds, we've deleted virtual dir and recreated, and performed all of the IIS munging that we've found elsewhere online. Various combinations of IIS bounces, server reboots, virtual dir/application recreation, etc.

  4. Code level permissions issue. We've verified full trust in machine/web config in the framework directory, we've set .NET trust to full in IIS, we've granted Everyone full control on the directories just to hit it with the security hammer, etc. etc.

The pertinent detials: Windows Server 2008 x64 IIS 7, 32 bit compatible app pool (app was written on 32 bit OS compiled for any cpu) App pool identity set to NetworkService Microsoft ASP.NET MVC 1.0 XCopy deployment

We deployed another read-only app just fine. The significant difference in this app is the use of NHibernate and Log4Net which require full trust. Additionally, the actual project name of the web project differs from the default namespace however the Inherits namespace in Global.asax and the Global.asax.cs files match so this shouldn't be an issue.

Anybody have any bright ideas? We're officially down to just the dim ones.

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

There is no code snippet as the app won't load at all. It fails immediately with no time lag on first request after install.

It's the same thing all these folks over here are having trouble with


2010-05-06 15:26:18Z


1:


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

I had mine set to x86 (one I had created to allow code changes during debugging on x64 computer). When I changed it back to Any CPU the the problem you described went away.



2:


Exception is "Could not load type <MyDefaultNamespace>.<Global.asax.cs class name>"

There is no code snippet as the app won't load at all. It fails immediately with no time lag on first request after install.

It's the same thing all these folks over here are having trouble with




 اين مطلب بدون دخالت انساني عينا از اين آدرس کپي شده و تمامي مسوليت آن با ناشر اصلي است.

How to get a user's client IP address in ASP.NET?
The breakpoint will not currently be hit. No symbols have been loaded for this document in a Silverlight application
WCF - How to Increase Message Size Quota
How to get current page URL in MVC 3
Why is access to the path denied?
Login failed for user 'IIS APPPOOL\ASP.NET v4.0'

How to add doublequotes to a string that is inside a variable?
Select method in List<t> Collection
Setting dropdownlist selecteditem programmatically
How to write a simple Html.DropDownListFor()?
What is the right way to populate a DropDownList from a database?
A potentially dangerous Request.Path value was detected from the client (*)
*