R – Upgrading a ASP.NET 1.1 Web Service using the WSE 2.0 to .NET 3.5

netweb services

We recently upgraded an application that that contained web services using the WSE 2.0 to .NET 3.5. When we converted the project in Visual Studio 2008, It did not mention anything about the removing and/or modifying the WSE 2.0 namespaces. Here is the basic architecture of the web services in the .NET 1.1 project.

Web Service Source Code:

[WebService(Namespace="http://tempuri.org")]
public class MyWebService : BaseWebService
{
    //Do some stuff
}

BaseWebService Source Code:

using Microsoft.Web.Services2;
using Microsoft.Web.Services2.Security;
using Microsoft.Web.Services2.Security.Tokens;

namespace MyNameSpace
{
    public class BaseWebService : System.Web.Services.WebService
    {
        public BaseWebService()
        {
            if(RequestSoapContext.Current == null)
                throw new ApplicationExcpetion("Only SOAP requests are permitted.");
        }
    }
}

During the conversion, the BaseWebService.cs class was excluded from the project and the WSE2.0 namespaces were removed from the class.

Have anyone else experiences any issues with trying to upgrade a web service from .NET 1.1 using the WSE to .NET 3.5?

This is related to the previous question I had regarding a client consuming the upgraded web service:

Stack Overflow Question

Best Answer

As I answered to the original question:

WCF (.net 3.5) is said to be compatible with WSE3 (.net 2.0+), but not with WSE2 (.net 1.1+).

So if you don't want to change the client, but want it to be compatible with the service, you can leave the old service source code and keep the references to WSE2 assemblies under VS2008 solution. Thus, both the client and the service will be compatible.