views:

689

answers:

3

I used Visual Studio 2008 to publish my asp.net website. When I bring up the website on the server (Windows 2008 server), I noticed that the code in global.asax was not running. My Global.asax body is similar to:

<%@ Application Language="C#" %>
<script runat="server">
    protected void Application_Start()
    {
        // Initialize some site settings like a task scheduler
    }

    protected void Application_End(object sender, EventArgs e)
    {
        // Perform some clean up code
    }
</script>

There is a App_global.asax.dll in the compiled websites bin folder, but that does not seem to help.

Is there a configuration option that I'm missing? Removing the App_global.asax.dll and using the original global.asax with the precompiled website works fine.

A: 

There are some solutions in this post which fixes the problem for some people, but not all. You could try them and see if it works for you.

keyboardP
+1  A: 

The only answer I've found is to include global.asax (with logic) in the compiled output folder.

Jim Geurts