简体   繁体   中英

Questions about hosting WCF as Windows Service

I have a complex WCF service that uses for example TCP, WindowsLogin, CustomLogin and transactions.

This have been hosted in IIS7 with WAS but to get better performance I will now try to move this in to a selfhosting environment as a Windows Service.

But I got som questions before I start this project :

  1. Will I be able to install multiple instances of the same service without building several installation packages?

  2. Will the WindowsLogin and CustomLogin work as before?

  3. The startup time when hosted in IIS can sometimes be as long as 1 minute, I saw something about a 30 sek limit when hosted in a Windows Service? How do I handle this?

  4. Is there something else I should consider before starting this project?

  5. Do you got article to recommend on this subject?

1.Will I be able to install multiple instances of the same service without building several installation packages?

Yes, make your service name configurable in the installer. The port should also be configurable too so it does not conflict with other instances.

2.Will the WindowsLogin and CustomLogin work as before?

Yes

3.The startup time when hosted in IIS can sometimes be as long as 1 minute, I saw something about a 30 sek limit when hosted in a Windows Service? How do I handle this?

Either start it async, or call this.RequestAdditionalTime in your OnStart() method

4.Is there something else I should consider before starting this project?

This one is really broad, kinda hard to address

5.Do you got article to recommend on this subject?

http://msdn.microsoft.com/en-us/library/ms733069.aspx

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