简体   繁体   中英

Global Application_Start not firing calling my service using Named Pipes

I have a service running on Named Pipes. The service should do some stuff on startup, so I defined this in the Global.asax. Now I am experiencing that this is not being when the service receives it first call. Is using Named Pipes different in this way?

protected void Application_Start(object sender, EventArgs e)
{
    Log.Information("Application_Start().");
    DoSomeStuff();
}

Non-HTTP endpoints do not pass the IIS processing pipeline and will get routed directly to the WCF runtime. This means that you can't use an HttpModule to pre- or post-process requests. In addition, the Application_Start and Application_End of the HttpApplication class (global.asax) don't fire. So if you want to run startup or cleanup code for such services, you have to use the events of the ServiceHost class.

Source

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM