views:

189

answers:

3

I want to create a stand-alone (i.e. not hosted in IIS) web service in ASP.NET. Is this possible, and if so what's the best way to do it?

+1  A: 

Open Visual Studio, start a new Project and select "web Service Application"

Sir Psycho
that is a great way to create a standalone webservice in .net!
Shawn Simon
What if Visual Studio is already open? I don't think you thought through all the possibilities here.
MusiGenesis
by "Stand alone", I mean, it doesn't require IIS. What you suggested creates a standard IIS dll based webservice.
@Sir Psycho: I edited his question, so your answer will look pretty irrelevant now. Sorry - I laughed when I read it.
MusiGenesis
+2  A: 

So, you want to use ASP.NET to generate a web service, but you don't want to host ASP.NET using IIS. (For those reading this, the question was made clearer in an comment to Sir Psycho's response).

Then this article would be a good start:
http://aspalliance.com/articleViewer.aspx?aId=220&pId=

It describes how you can use System.Web.Hosting namespace to process asp.net from the command line, and output the resulting HTML (or in your case XML).

Assuming you want data returned like a normal web request, you will to set up a socket to listen on port 80, interpret the HTTP requests, then use code similar to that in the article to output the results as a response to the web request.

Ady
A: 

I don't know if this answers the question exactly. If you want to create a webservice, is there a reasonable way to not require IIS but not have to handle data at a socket level.?