Tips,Tricks and Traps on Adding Web Reference using Visual Studio 2005 and Visual Studio 2008

What/how does cause this issue/problem?

We have done so many experiments. Based on those experiments here are the findings>>

Condition 1: “It generally happens to the webservice that require client user to provide credentials.”

Condition 2: It is a general happens in Visual Studio 2005, not in Visual Studio 2008.

From the Web Service Client Point of View

Case 1. Once added one Web Service reference that requires Authentication, when trying to add another Web Service reference that requires Authentication in a single project , it fails simply showing the below error in service description section in the right of the dialog.

“Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘EnvDTE.IVsExtensibility’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{3C536122-57B1-46DE-AB34-ACC524140093}’ failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).”

Case 2. It generally happens to the webservice that requires client user to provide credentials. When trying to refer multiple web services that require authentication in a single project, this is a very common error.

 Case 3. Sometimes when retrying to refer the same web service that requires authentication..

From Web Service Server Point of View

Those web services which have either Integrated Windows Authentication or Digest Authentication settings in IIS will require authentication credentials when trying to add those web service references from Visual Studio. That means when trying to add web service using Visual Studio, it will prompt for Username, Password and Domain credentials, after giving the correct credentials, a proxy will be created.

150 150 Burnignorance | Where Minds Meet And Sparks Fly!