0

I have a virtually empty asax file that has just one line of code:

<%@ Application Language="C#" CodeBehind="Global.asax.cs" Inherits="Applications.Global" %>

Shouldn't there be more accompanying code?

Applications.Global is defined in the code-behing like this:

namespace Applications
{
    public class Global : System.Web.HttpApplication
    {
        void Application_Start(object sender, EventArgs e)
        {

            //Helper.CacheMasterTemplate();

        }
    }
}

but the compiler complains that it cannot load type 'Applications.Global' from the first line of the asax file. How can I change the code to make this work?

4

1 回答 1

0

您需要解决问题。大多数情况下,您会收到该错误,因为输出路径已更改。应该是bin。如果您以 x86 为目标,Visual Studio 会将其更改为bin\x86\Debug. 改回来。转到 PROJECT > YourProject Properties > Build 并检查输出路径。

于 2013-11-04T22:33:52.797 回答