I just migrated my web application from ASP.NET 1.1 to ASP.NET 2.0, and Visual Studio 2005 is reporting 39 errors in my Global.asax file. I wouldn't care so much, except that my application isn't calling the Session_Start and Application_BeginRequest methods, and I'm thinking that this invalid Global.asax file might be the reason why.
This is the complete contents of my Global.asax file:
<%@Application CodeBehind="Global.asax.cs" Inherits="KJI.Global" %>
In that one line, VS found 39 errors, and I can't figure out what's going wrong. There are:
16 errors whose description just says "Syntax Error,"
16 that say "Statement cannot appear outside of a method body,"
2 that say "End of statement expected,"
2 that say "Bracketed identifier is missing closing ']'", as well as:
"'Namespace' statement must end with a matching 'End Namespace'",
"'Class' statement must end with a matching 'End Class'",
"End of statement expected".
Can anybody please explain what's causing all these error messages?