Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / August 2006

Tip: Looking for answers? Try searching our database.

vs 2005 - web reference issue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Param - 15 Aug 2006 18:28 GMT
Hi all,

We are experiencing a strange issue with VS 2005. We are trying to add Web
References to Web Services that require Authentication. The first web
reference adds fine. It prompts for the U/P (which is saved) and everything
works fine. Now when you go to add the 2nd web reference in the same
project, it doesnt ask for the U/P and it simply fails with a COM error:-

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

However, if we start a new Project and then try to add the web reference for
the 1st time it works fine.

Any ideas?
Steven Cheng[MSFT] - 16 Aug 2006 08:16 GMT
Hi Param,

From your description, you're encountering a "Unable to cast COM object of
type 'System.__ComObject' to interface type ..." error when try add a
webreference against a webservice which is protected by authentication,
correct?

According to processing steps you mentioned, I've perfomed some local tests
and did reproduct the same problem behavior, here is my test steps and
results:

1. Set up a webservice project which require authentication(basic or
integrated windows) and disable anonymous. When adding reference to one
asmx endpoint in this project in a client VS 2005 project, it prompt for
username/password credential, after enter the credentials, the proxy is
generated correctly.

2. After #1, try adding web reference against another asmx endpoint in the
same project, this time the service description panel in the right side of
the dialog didn't provide webservice information, but report the following
error:

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

Is this the exact behavior you met?  

Also, I've tried some other tests and found that:

1. The problem is specific to Visual Studio 2005's design-time IDE
components since I can use the "wsdl.exe" utility to create the webservice
proxy externally correctly in command line.

2. The problem is specific to the webservice which require client user to
provide credentials , and will prompt credentials input dialog when visit
the WSDL document page through web browser.  If we enable "anonymous
access" in the IIS server, the problems also goes away.

Regarding on this behavior, I've checked our internal product database and
did found  some records describing the same issue on this and an internal
bug entry has been reported(by some other engineers). Here is some
available workarounds of this issue:

1. Instead of directly navigate to the webservice's WSDL page
(xxx.asxm?WSDL), we first view the document page in a webbrowser and save
the WSDL document into a local xml file (xxx.wsdl) on file disk.  Then, we
can add web reference against that local xml file in Visual studio 2005

2. Instead of using Visual Studio 2005 "add web reference" menu, we can use
the .net framework's  wsdl.exe utility to generate the proxy from
commandline and there is options that for supplying credentials when the
service require client authentication. e.g:

wsdl.exe  /d:servername  /u:administrator /p:password01  
/out:myProxyClass.cs  
http://localhost/ASPNET/WebServices/WindowsAuthService/NEWService.asmx?WSDL

#Web Services Description Language Tool (Wsdl.exe)  
http://msdn2.microsoft.com/en-us/library/7h3ystb6.aspx

In addition, I will help reforward this issue to our product team.
Meanwhile, I found that there is still no record in the public product
feedback bug database below:

#Visual Studio and .NET Framework Feedback
http://connect.microsoft.com/feedback/default.aspx?SiteID=210

I would recommend you also file a bug report in the above site(with the
above information) so that our product team can also hear this from the
community and make it at a higher priority issue.

If there is any other information you wonder, please feel free to let me
know.

Thanks for your understanding!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
param@community.nospam - 17 Aug 2006 04:46 GMT
Steve, everything you have below is correct. I will file the bug report
soon.

TIA!

> Hi Param,
>
[quoted text clipped - 110 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Steven Cheng[MSFT] - 17 Aug 2006 08:17 GMT
Thanks for your reply Param,

You can also provide the public bug report link here so that any other
community members can refer to them.

In addition, here is a brief summary of this issue:

========PROBLEM DESCRIPTION===================
When try using the "Add Web Reference" function in Visual Studio 2005 to
create webservice client proxy against multiple webservice endpoints (asmx
files) in the same webservice application. And if the webservice
application is protected by client authentication which will prompt for
client to input credentials, the IDE will report the following exception:

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

========= CAUSE==========================
This is a pure Visual Studio 2005 specific issue, the interal design-time
COM object has problem when dealing with service endpoint that will prompt
for inputting client credentials.  

==========CURRENT WORK AROUND =====================

1. Visit the service description/WSDL document in external webbrowser and
save the WSDL document to local file system.   And add web reference
against the local saved WSDL document in Visual Studio 2005.

2. Use the WSDL.exe command utility in .net framework to create webservice
client proxy externally.

========================================================

Thanks again for your posting and the information you provided.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.