Migrating a project from ASP.net 1.1 to ASP.net 2.0 and I keep hitting this error.
I don't actually need Global because I am not adding anything to it, but after I remove it I get more errors.
Migrating a project from ASP.net 1.1 to ASP.net 2.0 and I keep hitting this error.
I don't actually need Global because I am not adding anything to it, but after I remove it I get more errors.
There are a few things you can try with this, seems to happen alot and the solution varies for everyone it seems.
If you are still using the IIS virtual directory make sure its pointed to the correct directory and also check the asp.net version it is set to, make sure it is set to asp.net 2
Clear out your bin/debug/obj all of them. Do a clean solution and then a Build Solution.
Check your project file in a text editor and make sure where its looking for the global file is correct, sometimes it doesnt change the directory.
remove the global from the solution and add it back after saving and closing. make sure all the script tags in the aspx file point to the correct one after.
You can try running the convert to web application tool, that redoes all of the code and project files.
Make sure you close VS after you try them.
Those are some things i know to try. Hope one of them works for you.
I've found that it happens when the Global.asax.(vb|cs) wasn't converted to a partial class properly.
Quickest solution is to surround the class name 'Global' with [square brackets] like so (in VB.Net):
Public Class [Global]
Inherits System.Web.HttpApplication
...
I had this same problem installing my app to a server. It ended up being the installer project, it wasn't installing all the files needed to run the web app. I tried to figure out where it was broken but in the end I had to revert the project to the previous version to fix it. Hope this helps someone...