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...

  1. 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. ...

Get Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.