Weird Global.asax parse error
- 8th April 2005 | permanent link
- comments (4)
A few days back I came accros a strange Global.asax parse error. The whole thing seamed to crash on the first line of the mentioned file. Strange indeed. Well after a few hours of googling I came up with the folowing steps to remove the error.
For further reference you can find the full error report here.
First you should get the background. I'm developing a web application in Visual Studio .NET in ASP.NET with C#. The whole project was running smoothly until everything went sour. For some reason or another the parser kept returning a somewhat weird error report. To my releif google returned a bunch of hits regarding this kind of errors. But as you might have guessed, they were quite a few posible "solutions" that were poping up on forums.
This is what I came up with, that worked for me.
Step 1:
Delete all of your bin folders in your current project folder (you could just delete only your .dll files from those bin folders, but I like to be as lasy as I can possibly be). The go to your VS.NET sollution explorer and rebuild the whole project. That did it for me the first time.
Step 2:
But my troubles didn't end there. After a couple of hours of smooth working the whole thing took another plunge. By now the first step didn't work anymore. What I did was to copy the whole project into another directory and set up an IIS virtual directoy and test the app.
To my obvious surprise the thing worked in that folder but not in the original one. This let me to belive that IIS was to blame for the whole thing. I deleted the original virtual directory, then set it up again just to find the same error. This led me to my third and final step on my way back to prosperity.
Step 3:
Start >Turn Off Computer > Restart
Walla :) I guess I must've done something right... :)
Entrie references:
http://forums.aspfree.com/archive/t-17894/Parser-Error-Message-Could-not-load-type
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306155
http://forums.devarticles.com/t6233/s.html
http://www.google.com


Me neither :) It was a project requirement, so it was either that or no deal...
I recently attended a lecture that Microsoft has 2-3 times a year on my college. They were talking a lot about ASP.NET 2.0 and I must say that I was surprised by its functionalities. They changed a lot and I will try it out when it goes non beta. I must say that some of the new features makes your life a lot easier.
I did take a quick look at PRADO, but didn't really work with it. I saw that everything is .NET-like - event driven. I'm considering building my next version of my CMS to be made with PRADO, but I'm not really sure, yet :)
As for ASP.NET2 I said before that it looks very interesting, but for the time being I can say for sure, that my main language will stay PHP. But as they say: "Never say never" :))