Solved

Need a way to force application start

Posted on 2011-02-17
8
536 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
ID: 34921682
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
ID: 34924761
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
ID: 34924883
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 2

Expert Comment

by:jondow
ID: 34925056
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
 

Author Comment

by:No1Coder
ID: 34925130
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
ID: 34925167
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
ID: 34945929
No apparent solution exists.  Clsoing.
0
 

Author Closing Comment

by:No1Coder
ID: 34986541
No solution exists.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 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