TCP WCF Service isn't executing Application_Start
Problem: The Application_Start event is not being triggered in my WCF Service which contains a TCP endpoint.
Background: I'm hitting trying to hit the service from a console app. If the service is not yet started, the call will fail because Application_Start never fires. However, if I explicitly start the service (hit the hosting web app from a browser) then an开发者_Python百科d then call the service from the console app it works fine.
Question: What gives? If the only thing being hosted in the service application is a tcp endpoint does Appliction_Start of the HttpApplication never get triggered? It makes sense to a certain degree as it is essentially being treated as a non-http application via WAS. However, it doesn't make sense because it is being hosted in IIS.
Application_Start
will never be hit in a WAS hosted WCF service. This event is ASP.NET specific (no IIS specific), so unless you are hosting your WCF service in ASP.NET it won't be hit: and you are not as it is hosted by WAS.
精彩评论