Work and Play

Monday, February 27, 2006

Conversions and Global.asax

We had an interesting situation pop up last week. Some of our pages use Peter Blum's VAM and/or Date controls. These require the licenses to be initialized in global.asax Application_Start (or other locations, but this option was best for us). On our development machines this worked fine, but when attempting a deploy last week any pages using these controls broke.
What we found was that this event was never firing, so the licenses were never initialized. The global.asax file was not in the deployed project folder, so we added it. The resulting error told us that the code was already in the compiled dll. Apparently, the issue here is that the conversion tool took the global.asax's codebehind file and put it into the App_Code folder. This is a "Bad Thing," as ASP.NET 2.0 gets rid of codebehind for global.asax - everything is in one file now.
Deleting the code file and incorporating everything into global.asax, then re-deploying, fixed the issue. I have seen some other posts with people having difficulty with Session events - hopefully this will help someone! :)

0 Comments:

Post a Comment

<< Home