Why are the Global.asax events not firing in my ASP .NET website?

前端 未结 11 1962
执笔经年
执笔经年 2020-12-11 15:24

I\'ve been developing an ASP .NET 3.5 web application against Cassini, the built-in web development server, rather than against IIS.

In my Global.asax file, in the A

11条回答
  •  忘掉有多难
    2020-12-11 15:58

    I thought I had a similar problem, working on some old projects, I was under the impression that the global.asax was not running because the code would first go into building my authentication controller which would fail because of class not registered (that part happens in the global.asax).

    Turned out it was due to a config item. When I moved the AuthenticationModule declaration into handler section in web config, it worked fine with IIS express.

    Basically, because of a config item, another piece of code was being executed before global.asax, making me believe that it would not be called.

提交回复
热议问题