Sometimes, for various reasons, we come across projects or solutions we have to maintain to our chagrin. We have an application which runs on .NET 2.0 and can’t be upgraded to 3.5 or beyond. This application consumes web services published via the old ASMX services, and uses Web Service Extensions 3.0 (WSE 3.0) – the precursor to Windows Communication Foundation (WCF).
If you are in the same position, and you have upgraded your solution to Visual Studio 2010 (but are still targeting .NET 2.0), you might find that, by default, updating those web references causes the base class to change from WebServicesClientProtocol to SoapHttpClientProtocol.
This is by design, as it is anticipated that all web services be upgraded to WCF, however sometimes this causes widespread destruction and it’s easier and more convenient to just be able to use the previous importer. This can be done in Visual Studio 2010, but it is somewhat nasty.
Here is a step by step guide to enabling WSE 3.0 references in Visual Studio 2010:
1. Close Visual Studio 2010
2. Download and Install WSE 3.0 (if you haven’t already)
3. In Explorer, open the following folder:
a. C:\ProgramData\Microsoft\MSEnvShared\Addins (or)
b. C:\Documents and Settings\All Users\Application Data\Microsoft\MSEnvShared\Addins
4. Locate the following file:
5. Open the file in Notepad
6. Replace <Version>8.0</Version> with <Version>10.0</Version>, then save
7. In Explorer open the following folder:
a. C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
8. Locate the following file:
9. Open the file in Notepad
10. Add the following at the end of the file (before the </configuration>) and save:
Microsoft.Web.Services3, Version=184.108.40.206, Culture=neutral,
11. Open Visual Studio 2010
12. In Tools -> Options -> Environment->Add-in/Macros Security ensure that this entry exists:
13. Update web references