By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,866 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,866 IT Pros & Developers. It's quick & easy.

How to start Web Application automatically afrer IIS is started?

P: 7
Hi All,

I have a Web App, I want to start Main page automatically after IIS is started without any request from browser.

OR run one Script in Global.asax after IIS started.

I understand that the Application_Start on Global.asax is fired only have any request from browser on my application.

Now I want to start App auto after IIS started.

Please help me, thanks a lot.
Jan 20 '08 #1
Share this Question
Share on Google+
5 Replies

Expert 2.5K+
P: 4,871
Still unclear what you are trying to do, not sure that your handle on application_start event is correct.
Jan 21 '08 #2

P: 7
I mean that, I have "function A" in global.asax file, I want IIS call Function A when I stop and re-start IIS.

That means IIS will call any Function in my app without everybody request my app from Browser.

Please help me in urgent.
Jan 22 '08 #3

Expert 2.5K+
P: 4,871
Bewilded as I am by the design, I am not sure the application events will fire as you expect. I believe that these events are influenced by the framework. So that your very first user triggers the start event and restarting/power outage of the server triggers the end event. So I would expect stopping and starting iis to have no influence on these events.
Jan 22 '08 #4

P: 1
i have a response for iis on windows 2003

in iis Management console

créate a new application pool
configure this pool so iis do not recycle de proccess evy xxx minutes so all application in this pool donot stop .

go to your application and configure it thas it will run in this application pool
[IMG]application config[/IMG]

to start your application creeate a register entry
in Run key value of entry explorer http://localhost/myapp/defaultpage.aspx
your application start when windows start
Attached Images
File Type: jpg app0.jpg (23.8 KB, 1006 views)
File Type: jpg app1.jpg (24.1 KB, 869 views)
File Type: jpg app2.JPG (28.3 KB, 879 views)
Aug 27 '08 #5

P: 1
Is there a way to fire the global.asax of any web app after IIS is reset for any reason what-so-ever. Entering a registry key would not resolve the entire issue as IIS can be reset without rebooting a machine. The fix has to be either at IIS property level /application pool level but the solution suggested does not fire application_onstart after IIS reset.

I created an separate application pool for the web app and unchecked the recycling but still no luck.

I also created an scheduled task to fire the default page of the web site to mimic an user request from browser on my application, which works but that defeats the purpose of the web app as I used that as a substitute for Scheduled tasks which are mostly unmanaged (.vbs/.bat) or carry lot of overhead for managed services.

Please can you clarify the app pool solution further?


Jan 8 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.