asp.net - Call ApplicationStart Method in Global.asax Without a Request -


i'm publishing asp.net site iis( local machine has iis v8, server's iis v7 ). want start function in global.asax.cs without calling page.

*when call page, global.asax.cs application_start method launches. want launch without page call request.*

  namespace productservice.xmlfeed {     public class global : httpapplication     {         protected void application_beginrequest(object sender, eventargs e)         {             ftpuploadermain.registercacheentry(); //this method want start without page call         }          void application_start(object sender, eventargs e)         {             simplelogger.writelog("application started without page call","d:\\log.txt");              registerroutes();              //ftpuploadermain.registercacheentry();         }          private void registerroutes()         {             routetable.routes.add(new serviceroute("products", new webservicehostfactory(), typeof(productxmlfeedservice)));         }     } }  

you can use preload enabled feature of iis8 - iis 7.5 use application- initialization -

http://www.iis.net/downloads/microsoft/application-initialization


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -