Hosting web services in a windows NT service.

Posted on 2006-11-14
Last Modified: 2010-04-16


I'm building an application in c# and  i've found that the most appropriate way to design it is a windows service. The program will occasionally need to be called from other non windows machines, and I was wanting to use web services to enable this.
The question is, Is it possible to run xml web services in a windows service.

Question by:scope_creep
  • 2

Expert Comment

ID: 17944588
your question is not clear.

1. Do you talk about windows service or web service?

2. How can you run a web service in a windows service?? web service is a web application, run at a web server - in your case must be IIS (because your using C#)

Accepted Solution

mjmarlow earned 500 total points
ID: 17945436
Yes you can run web services inside a windows service.  You can create your own "http listener" from within your service.  That listener can respond to web service requests.  See this article:

Author Comment

ID: 17948151
Hi Folks,

I saw that article mjmarlow. I think the support for asmx being hosted outside of IIS has been imporved, re, in .NET 2.

But what i'm really asking is wil the web services still be able to use WSE 3.0 . I know that simple web services can be implemted by building a custom httpworkerrequest handler, but without the security its a waste of time. The app calls for it.


Author Comment

ID: 17971625
Hi Folks,

I found out you can create web services, i.e. web methods   on a windows service. There is a sample from the WSE 3 samples pack, which shows how it
can be done. With .net 2 also don't need to create a custom SSPI class. WSE3 handles it all.


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now