Solved

Need a way to force application start

Posted on 2011-02-17
8
532 Views
Last Modified: 2012-05-11
I am coding a "wake up" system for my app.  I am using a "cache expired" event to trigger things.  I need to wake up my application after it has stopped due to inactiviy.  One recommended method is to hit the site with an http request.  This is not working for me because of router issues.  (trying to send request to myself on the public network does not work due to router configuration poblems).  Also, sending a request seems like an extreme kludge just to get the application to startup.

Is there a way to force an application start from code, without sending an http request to the site?

0
Comment
Question by:No1Coder
  • 4
  • 3
8 Comments
 
LVL 16

Expert Comment

by:BurnieP
Comment Utility
Hi,

You can check this article titled : Forcing an ASP.NET Application to 'stay alive'  at http://www.west-wind.com/weblog/posts/67557.aspx.

0
 
LVL 2

Expert Comment

by:jondow
Comment Utility
Assuming you are using .net 4 with IIS 7+ you can use the auto start feature...

To use the ASP.NET 4 auto-start feature, you first configure the IIS “application pool” worker process that the application runs within to automatically startup when the web-server first loads.  You can do this by opening up the IIS 7.5 applicationHost.config file (C:\Windows\System32\inetsrv\config\applicationHost.config) and by adding a startMode=”AlwaysRunning” attribute to the appropriate <applicationPools> entry:

    <applicationPools>

         <add name="MyAppWorkerProcess" managedRuntimeVersion="v4.0" startMode="AlwaysRunning" />

    </applicationPools>

Full article at:
http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx
0
 

Author Comment

by:No1Coder
Comment Utility
jondow: I am running w2008 web server.  Unfortunately, it does not have the auto start feature.


Burniep: This solution sends a web request to wake up the server.  This is what I am trying to avoid.
0
 
LVL 2

Expert Comment

by:jondow
Comment Utility
Im not sure then.

A bodge I use on one of my websites (publicly available) is to use pingdom, which hits a designated web page at regular intervals.  I know thats what you are trying to avoid but it may be a useful and easy option if you dont find another way.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:No1Coder
Comment Utility
Jondow:  I wrote one of these myself.  I was trying to make the application self sustaining though.  I guess there is no solution.
0
 
LVL 2

Expert Comment

by:jondow
Comment Utility
Check this one out, havent tried it yet but the idea is sound:

http://weblogs.asp.net/dmarsh/archive/2003/02/21/2758.aspx

Or will you get the same routing issues with this approach?
0
 

Accepted Solution

by:
No1Coder earned 0 total points
Comment Utility
No apparent solution exists.  Clsoing.
0
 

Author Closing Comment

by:No1Coder
Comment Utility
No solution exists.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now