Solved

Need a way to force application start

Posted on 2011-02-17
8
534 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

17 Experts available now in Live!

Get 1:1 Help Now