views:

247

answers:

5

I am still relatively new to web service development and I need to make a web service in C# .Net. I have created web services before in Java and run them using Tomcat. Do I have to use IIS to run a .Net webservice or can I use a third party web server (Tomcat or something else)?

Thanks

+5  A: 

WCF is the successor of Web services.

If you use WCF, you can host in a Windows Service or in IIS.

Hosting and Consuming WCF Services

Mitch Wheat
+1  A: 

IIS has an ISAPI extension that can ran .NET pages and services. I'm not aware of any other web servers have any such extensions.

Update:

I just did some more research. Using Mono project will allow you following:

Apache hosting: use mod_mono, a module that allows Apache to serve ASP.NET applications. FastCGI hosting: use the FastCGI hosting if you have a web server that supports the FastCGI protocol for extending the server. You also may use a web server that only has support for CGI using cgi-fcgi. XSP: this is a simple way to get started, a lightweight and simple webserver written in C#.

Vadim
A: 

The hosting environment simply needs to be able to host ASP.NET applications to run an ASP.NET webservice. This means that you can use the likes of Cassini, Mono on Tomcat or even in a custom environment that hosts the Http Pipeline with http.sys.

Pete OHanlon
A: 

You do not have to host WCF in IIS, but there are several benefits, and possible limits (depending on version of IIS), to doing so. The great thing about WCF is that you have several hosting options.

IIS is becoming the 'application server' of the Windows world and is a very attractive host for WCF, depending on your needs. Hosting in IIS is likely very analogous to hosting in Tomcat or other J2EE server in the Java world - this analogy becomes truer once 'Dublin' ships.

See Hosting in Internet Information Services for some additional benefits, and possible constraints, to hosting in IIS.

Zach Bonham
A: 

You don't need to run IIS to host a service.

.net (via WCF) provides all functionality required to turn any application into webservice host via the ServiceHost class.

spender