Ask a Question related to ASP Components, Design and Development.
-
Billse #1
Problems using a com object in asp.net
I am trying to use some com objects in .net that we have been using in ASP
Classic for quite some time now. I have follow the reading on how to add a
reference to the com object from Visual Studio and that does create a new
interop dll and place it in the bin directory. I can then access the methods
of the object through intellisense and everything compiles and looks like it
will run great. Then I actually run the program and receive the following
error.
Unable to cast COM object of type 'Namespace.TestClass' to interface type
'Namespace._Test'. This operation failed because the QueryInterface call on
the COM component for the interface with IID
'{9D2930FF-B15F-4047-8C28-1DF43362A34F}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)).
The code I used to produce this error is as follows:
Namespace.TestClass moTest = new Namespace.TestClass();
moTest.Load("OM005", "EN");
The error is thrown on the second line.
Any help on a resolution for this issue would be greatly appreciated. I am
using VS 2005.
Thanks
Billse Guest
-
Having problems with shared object
Hi all, Presently i am dealing with a project which gives option to its user of recording their own voice on a popular songs music. Something like... -
Problems returning an array in an object - Web Service
Ole Mugaas via .NET 247 <anonymous@dotnet247.com> wrote in news:OvAvlsUWFHA.2796@TK2MSFTNGP09.phx.gbl: Objects cant be returned over a soap... -
as to java object -serializing problems
I can get an simple object. deserializing. no problems i made an updateCustomer(Customer cus) in my java object , this method will store my... -
aspUpload and File object problems??
I'm thinking this has something to do with data type but I'm not sure. All I'm trying to do here is upload media to the server using aspUpload then... -
Problems creating FDF object
Using Java, I have a fillable PDF that when the user submits, the FDF output stream is caught, coverted to string and then written to a file. The... -
Anthony Jones #2
Re: Problems using a com object in asp.net
"Billse" <Billse@discussions.microsoft.com> wrote in message
news:DFFB3C4D-DD2C-49AD-8D6D-90D68798BAF8@microsoft.com...a> I am trying to use some com objects in .net that we have been using in ASP
> Classic for quite some time now. I have follow the reading on how to addmethods> reference to the com object from Visual Studio and that does create a new
> interop dll and place it in the bin directory. I can then access theit> of the object through intellisense and everything compiles and looks likeon> will run great. Then I actually run the program and receive the following
> error.
>
> Unable to cast COM object of type 'Namespace.TestClass' to interface type
> 'Namespace._Test'. This operation failed because the QueryInterface callerror:> the COM component for the interface with IID
> '{9D2930FF-B15F-4047-8C28-1DF43362A34F}' failed due to the followingam> No such interface supported (Exception from HRESULT: 0x80004002
> (E_NOINTERFACE)).
>
> The code I used to produce this error is as follows:
>
> Namespace.TestClass moTest = new Namespace.TestClass();
> moTest.Load("OM005", "EN");
>
> The error is thrown on the second line.
>
> Any help on a resolution for this issue would be greatly appreciated. ISounds like you need to to rebuild the inter-op assembly. However this NG> using VS 2005.
>
is for classic ASP try an appropriate dotnet NG instead.
> Thanks
Anthony Jones Guest
-
csuriano@csgai.com #3
Re: Problems using a com object in asp.net
I'm actually having the same problem. It worked fine in .Net 1.1, but when we upgraded to .Net 2.0 I get errors. Here's the code:
Dim objUser As TSUSEREXLib.ADsTSUserEx = Nothing
Dim strUserPath As String = String.Empty
Try
strUserPath = User.Path
objUser = CType(GetObject(strUserPath), TSUSEREXLib.ADsTSUserEx)
If Not objUser Is Nothing Then
objUser.GetInfo()
If _TerminalServices Is Nothing Then
_TerminalServices = New AD.adTerminalServicesOptions
End If
_TerminalServices.ProfilePath = objUser.TerminalServicesProfilePath.ToString
End If
Catch ex As Exception
end try
Here's the error message:
{"Unable to cast COM object of type 'System.__ComObject' to interface type 'TSUSEREXLib.ADsTSUserEx'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{C4930E79-2989-4462-8A60-2FCF2F2955EF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."} System.Exception
I can find the component in my registry, the interop is in the bin directory. And I forced .net to rebuild the interop by removing and re-adding the reference. And, as I said earlier, the exact same code runs in .Net 1.1.
Any help would be greatly appreciated.
Candi
---
Posted via DotNetSlackers.com
csuriano@csgai.com Guest
-
Anthony Jones #4
Re: Problems using a com object in asp.net
<csuriano@csgai.com> wrote in message
news:OhHWIvJ9GHA.3960@TK2MSFTNGP05.phx.gbl...we upgraded to .Net 2.0 I get errors. Here's the code:> I'm actually having the same problem. It worked fine in .Net 1.1, but whenobjUser.TerminalServicesProfilePath.ToString>
> Dim objUser As TSUSEREXLib.ADsTSUserEx = Nothing
> Dim strUserPath As String = String.Empty
> Try
>
> strUserPath = User.Path
> objUser = CType(GetObject(strUserPath), TSUSEREXLib.ADsTSUserEx)
> If Not objUser Is Nothing Then
> objUser.GetInfo()
> If _TerminalServices Is Nothing Then
> _TerminalServices = New AD.adTerminalServicesOptions
> End If
> _TerminalServices.ProfilePath ='TSUSEREXLib.ADsTSUserEx'. This operation failed because the QueryInterface>
>
> End If
> Catch ex As Exception
> end try
>
> Here's the error message:
> {"Unable to cast COM object of type 'System.__ComObject' to interface type
call on the COM component for the interface with IID
'{C4930E79-2989-4462-8A60-2FCF2F2955EF}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE))."} System.Exceptiondirectory. And I forced .net to rebuild the interop by removing and>
> I can find the component in my registry, the interop is in the bin
re-adding the reference. And, as I said earlier, the exact same code runs in
..Net 1.1.You might get more more help if you followed the advice I had already given>
> Any help would be greatly appreciated.
>
to the OP. Ask in an appropriate .NET group, this is for classic ASP.
> Candi
> ---
> Posted via DotNetSlackers.com
Anthony Jones Guest



Reply With Quote

