Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 9th, 2004, 11:58 AM
Registered User
 
Join Date: Jun 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default System.InvalidCastException QueryInterface Error

Hi,

I'm building a Web Service in .Net and I get the following exception "System.InvalidException. QueryInterface Error" when I try to call a COM+ component in a ASP.Net page. I'm using C# to call the component which was developed in C++. The component works fine when I call it in a ASP page or a VB6 app. This is my code:

[WebMethod]
public string Login(string user, string passw)
{
   iSicresAsp.Session Sess = new iSicresAsp.SessionClass();
   Sess.Login(user, passw);
   .....

I've added a reference to the dll in my project.

Thanks in advance.

 
Old November 30th, 2005, 01:21 PM
Registered User
 
Join Date: Nov 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had the same problem and finally got the solution:
Give Read permission to ASPNET user on the COM used. It's necesary to namely assign this permission: assing Full Control to Everyone is not enough (?).
I hope this helps.
Regards.






Similar Threads
Thread Thread Starter Forum Replies Last Post
System.InvalidCastException; System.Reflection.Tar Jophie BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 January 16th, 2008 03:29 PM
System.InvalidCastException: Specified cast is not scslarry BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 6 January 18th, 2007 07:34 PM
PhileIdentity - System.InvalidCastException terencetham BOOK: ASP.NET Website Programming Problem-Design-Solution 6 September 25th, 2006 02:27 PM
System.InvalidCastException: QueryInterface for sweta .NET Web Services 5 June 8th, 2006 02:32 AM
System.InvalidCastException: Specified cast is not chiefg BOOK: ASP.NET Website Programming Problem-Design-Solution 2 March 2nd, 2004 01:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.