2013-04-05 5 views
1

저는 iis (내 로컬 시스템에는 iis v8, 서버의 iis v7)이있는 asp.net 사이트를 게시하고 있습니다. 그러나 페이지를 호출하지 않고 즉시 Global.asax.cs에서 기능을 시작하겠습니다.요청이없는 Global.asax의 ApplicationStart 메소드를 호출하십시오.

* 페이지를 호출하면 global.asax.cs Application_Start 메서드가 시작됩니다. 나는 페이지 호출 요청없이 실행하려면 *

 

namespace ProductService.XmlFeed 
{ 
    public class Global : HttpApplication 
    { 
     protected void Application_BeginRequest(Object sender, EventArgs e) 
     { 
      FtpUploaderMain.RegisterCacheEntry(); //this method I want to start without page call 
     } 

     void Application_Start(object sender, EventArgs e) 
     { 
      SimpleLogger.WriteLog("Application Started without a page call","D:\\log.txt"); 

      RegisterRoutes(); 

      //FtpUploaderMain.RegisterCacheEntry(); 
     } 

     private void RegisterRoutes() 
     { 
      RouteTable.Routes.Add(new ServiceRoute("Products", new WebServiceHostFactory(), typeof(ProductXmlFeedService))); 
     } 
    } 
} 
 

답변

관련 문제