all groups > dotnet web services > april 2008 >
You're in the

dotnet web services

group:

Application as both WS client and server


Application as both WS client and server sandersja
4/23/2008 12:56:44 PM
dotnet web services: I am trying to come up to speed on .Net webservices and have gotten
stuck on a basic issue - I appreciate any clarification.

I can readily create C# applications that can consume webservices as a
client. In that same app, how can I offer webservices to other
clients? For example, so two apps can communicate.

Everything I read about providing webservices has them built into
asp.net pages running on IIS.

Re: Application as both WS client and server davidkclark
4/23/2008 3:31:31 PM
This article on msdn decribes how to host a webservice in a
windowsservice:
http://msdn2.microsoft.com/en-us/library/aa529311.aspx

Hosting in your client program should be similar. Basically you will
have to copy the source and config files for your webservice, add
usings for the appropriate Microsoft.Web.Services classes, and call
SoapReceivers.Add to start and .Clear to stop the service.

BTW: You might be better off looking into .Net Remoting if you are
looking for communication between applications (TCP or IPC depending
on the location fo the two clients)

Re: Application as both WS client and server BitCrazed
6/17/2008 3:03:23 PM
Alternatively, you might consider using WCF rather than ASP.NET Web
Services.

WCF will allow your app to create a proxy through which you can consume
remote web services (I.e. out of process or hosted on a different machine)
and also expose itself as a web service for others to consume.

Note that WCF will also allow you to use a variety of transports (e.g. HTTP,
TCP) and encodings (e.g. SOAP, POX, BinaryXML) depending on your needs, just
by changing the app config file!

--- BitCrazed ---

[quoted text, click to view]
AddThis Social Bookmark Button