locked
Move Code to Module RRS feed

  • Question

  • User1608082067 posted

    Hello,

    I have the following on Global.asax:

    protected void Application_Start() {
      InternalLogger.LogFile = HttpContext.Current.Server.MapPath("NLog.txt");
    }
    protected void Application_Error()
      ILog log = LogManager.GetLogger(this.GetType());
      Exception exception = Server.GetLastError();
      if (log.IsErrorEnabled)
        log.Error(exception.Message, exception);
    }

    How can I move this code to a module?

    How can I inside the module reference Application_Start and Application_Error?

    Thank You,

    Miguel

    Monday, March 12, 2012 8:50 AM

Answers