Hosting a service in WSS 3.0
ASP.NET ASMX Web Service is naturally supported in WSS 3.0, and developers can also write their own Web Services and deploy them into WSS 3.0 servers and sites. With the WCF coming in .NET Framework 3.0, people are also interested in how to deploy their custom WCF service into WSS 3.0 sites.
How to do it...
Creating the WCF service.
The sample service here is quite straightforward and contains a service operation that will return the current WSS site's URL (see the
GetCurrentWebUrl
function shown as follows):[ServiceContract] public interface ISimpleWSSService { [OperationContract] void DoWork(); [OperationContract] string GetCurrentWebUrl(); }
Our sample service will use BasicHttpBinding without any requirement for authentication. The service configuration of the sample service is shown in the following screenshot.
In the service configuration section, we have enabled
aspNetCompatibilityEnabled
so that our service code can...