我用Visual Studio 2008发布了我的asp.net网站。当我打开服务器上的网站(Windows 2008服务器)时,我注意到global.asax中的代码没有运行。我的Global.asax身体是类似于:Global.asax无法加载预编译的asp.net网站
<%@ 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>
有一个App_global.asax.dll在编译网站bin文件夹,但似乎并没有帮助。
是否有配置选项,我错过了?删除App_global.asax.dll并在预编译的网站中使用原始的global.asax可以正常工作。
我真的很感兴趣,请你解释一下关于如何在编译后的输出文件夹中包含global.asax的更多细节。 – 2012-11-14 05:11:30