Global.asax.vb code not executinghttp://forums.asp.net/t/981244.aspx/1?Global+asax+vb+code+not+executingWed, 12 Apr 2006 15:20:52 -04009812441254959http://forums.asp.net/p/981244/1254959.aspx/1?Global+asax+vb+code+not+executingGlobal.asax.vb code not executing <p>I used the migration wizard to upgrade my projects to 2005. It did not bring in my global.asax or global.asax.vb files. Instead it created a new global.asax file without any codebehind it. So I dragged and dropped my global.asax.vb file into the project. It complained about this...</p> <font color="#0000ff" size="2"> <p>Public</font><font size="2"> </font><font color="#0000ff" size="2">Class</font><font size="2"> Global</font></p> <p><font size="2"><font size="3">because &quot;Global&quot; is a reserved word. So I changed it to ERSWeb which is the name of the project. It compiles fine but seems to completely ignore the code in the global.asax.vb file. I'm a little confused about the code in the Global.asax file...</font></font></p> <font size="2"><font size="2"> <p>&lt;%</font><font color="#0000ff" size="2">@</font><font size="2"> </font><font color="#800000" size="2">Application</font><font size="2"> </font><font color="#ff0000" size="2">Codebehind</font><font color="#0000ff" size="2">=&quot;Global.asax.vb&quot;</font><font size="2"> </font><font color="#ff0000" size="2">Inherits</font><font color="#0000ff" size="2">=&quot;ERSWeb.Global&quot;</font><font size="2"> %&gt;</font></p> <p><font size="2"><font size="3">I've tried changing the Inherits to &quot;ERSWeb.ERSWeb&quot; since that is what I changed the class to but it didn't work - it won't hit my breakpoints in the Global.asax.vb file.</font></font></p> <p><font size="3">I would really appreciate any help with this problem.</font></p> <p><font size="2"><font size="3">Thanks!</font></p> </font></font> 2006-04-11T22:39:48-04:001255690http://forums.asp.net/p/981244/1255690.aspx/1?Re+Global+asax+vb+code+not+executingRe: Global.asax.vb code not executing <p>Update:</p> <p>It actually physically deletes the global.asax.vb file during the conversion process. Why would it do that? Again, it allows me to manually add the global.asax.vb file back in but for the life of me I can't get the code in there to execute. I've tried every permutation. Please help.</p> <p>This is what my global.asax file looked like after the conversion...</p> <font size="2"> <p>&lt;%</font><font color="#0000ff" size="2">@</font><font size="2"> </font><font color="#800000" size="2">Application</font><font size="2"> </font><font color="#ff0000" size="2">Inherits</font><font color="#0000ff" size="2">=&quot;ERSWeb.Global&quot;</font><font size="2"> </font><font color="#ff0000" size="2">Language</font><font color="#0000ff" size="2">=&quot;VB&quot;</font><font size="2"> %&gt;</font></p> <p><font size="2"><font size="3">After I added in the global.asax.vb file I changed it to this...</font></font></p> <p><font size="2">&lt;%@ Application Codebehind=&quot;Global.asax.vb&quot; Inherits=&quot;ERSWeb.Global&quot; %&gt;</font></p> <p><font size="2"><font size="3">It doesn't like the fact that the global.asax.vb class is called &quot;Global&quot; but it compiled fine this time so I left it. Urg.</font></p> </font> 2006-04-12T15:12:33-04:001255703http://forums.asp.net/p/981244/1255703.aspx/1?Re+Global+asax+vb+code+not+executingRe: Global.asax.vb code not executing I'm an idiot. Sorry, I am new to this .NET stuff. It did import the global.asax.vb file it just puts it in a folder called App_Code. I did not realize this. Sorry folks! 2006-04-12T15:20:52-04:001255869http://forums.asp.net/p/981244/1255869.aspx/1?Re+Global+asax+vb+code+not+executingRe: Global.asax.vb code not executing <p>Errethouse, I assume you have converted to Website project.&nbsp; Global.asax.vb&nbsp;should be &nbsp;moved to App_Code folder. </p> <p>Global has became a key word in VB, So you&nbsp; need to change it to [Global]&nbsp; in code-behind file to fix your problem. The rest will say as it is.</p> <p>Baiju</p> 2006-04-12T17:53:59-04:00