I have a web application that has both classic ASP and ASP.Net pages.

In the scenario below, will the session start event also fire in Global.asa when accessing an ASP.Net page?

A user has bookmarked an ASP.Net page, and he is taken to the login page when user tries to access it. Once the user logs in to this ASP.Net page, Session_Start event fires in Global.asax, but will the same event also fire in Global.asa?

有帮助吗?

解决方案

No, it won't. Global.asa will not be invoked unless any pages in the Classic ASP application are requested.

The only way to force Session_Start in Global.asa from your ASP.NET application is by making a HttpWebRequest from your ASP.NET application to your Classic application, but you'll need to proxy the request's cookies so the session is adopted by your end user's browser.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top