简体   繁体   中英

How to stop a WebService from C# WinForms

If I have 2 startup projects as explained here .

One is a WebSite/WebService; the other is a WinForms app.

How do I stop the Service when the C# WinForm app is closed.

UPDATE

Im running IIS Express within my Solution.

Ther are the 2 projects (WebSite/WinForms) When the WinForms app closes it must also stop the instance of IISExpress.

Im noticing that while debugging, I close the app but the Service is still running.

I didn't use IIS Express before but I guess it works over a process. So probably you will find and kill that process at all.

Checking this link may help.

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