Question : Can a Windows Service handle web requests?

I have an odd requirement where I need a web service to have state.  But given they are stateless, it's proving to be a challenge.

One suggestion was to move the entire web service into a Windows Service.  So the first question I have is whether a Windows Service can service request for web methods, coming from the web?

Please let me know.  This is a critical element that would save me the time wasted doing this analysis.


Answer : Can a Windows Service handle web requests?


An immediate thought on your state requirements for a web service why not maintain state yourself. First call to the webservice generate a guid that all subsequent calls must include and back that of to a database.

So I could imagine your webservice returning a complex type each time with a guid in it the first call the guids generated and a the guid and any other data requiring persistence is written to the db.

On your second point there is no reason why you couldnt build a basic soap server as a windows server but you would still have to do the work to persist values plus then all the comms and soap processing.

Just a thought.
Random Solutions  
programming4us programming4us