I'm developing this web service which is developed in VS 2005, with .net 2.0. I need to add a web refernce to an external web service which is developed in .net 4.0. I was able to do that. But when I try to access the newly added web refernece through my code, i get a build error - new added service is undefined. Why does my application does not recognise the newly added web reference. Is it something to do with .net version? Any help in this matter would be greatly appreciated. Thank you

  • I think you will have troubles embedding 4.0 code in a 2.0 web application since the app pool runs in .NET 2.0. You may have success executing the app pool as a 4.0 app, but I haven't tried it. – faester Jun 21 '11 at 13:14
  • She isn't embedding a 4.0 assembly, she is trying to use an external web service. Liz, What is the web service using? WCF I assume. And what binding is it providing? You should be able to access it using SOAP. – tster Jun 21 '11 at 13:17

If you set the WCF service to have basicHttpBinding, yes.

Here's what MSDN has to say


Although I never tried something like that, I think you can't reference a service made in a higher version as WCF (native code). You can still add it as a standard webservice reference (SOAP protocol) so it gets leveraged to w3c standards. You will lose some integration but you will be able to use it properly.

  • VS 2005 doesn't have WCF, and all the service references use SOAP if I remember right, so something is going wrong I think. – tster Jun 21 '11 at 13:22
  • 1
    Half truth - VS2005 doesn't support WCF natively, but there is an extension to add that support. – Matteo Mosca Jun 21 '11 at 13:24
  • @tster WCF was created as part of .NET 3.0 (one of the worst release titles in Microsoft's entire history, should have been 2.5 or not .NET titled at all) which was an extension of .NET 2.0 and brought only new areas to .NET including WCF and WFF. – Chris Marisic Jun 21 '11 at 13:36

Your Answer

