Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
626 views
in Technique[技术] by (71.8m points)

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

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 Application_Start event handler, I have some code which logs the fact that the website has started up. This all works fine with Cassini.

Since deploying the site to a virtual directory on a test server using IIS6, I am finding there are no log entries being written, and so I'm concluding that the Application_Start handler is not firing.

I then tried removing the virtual directory and running the site directly out of the root of the website on the test server, but it didn't make any difference - still no log entry for application start.

I know these events should fire irrespective of my deployment environment, has anyone got any ideas what is going wrong here?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you make a request to your app does the "Application_Start" fire then? I don't believe it will be started until the first request is made.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...