For Programmers: Free Programming Magazines  


Home > Archive > C# > June 2006 > Accessing Interop dll from ASP.Net









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Accessing Interop dll from ASP.Net
Tobester

2006-06-17, 7:02 pm

Hi

I am having problems accessing a vb6 dll from ASP.Net.


The vb6 dll is registered. I have then created an interop file using
tlbimp. The interop has been added to the GAC.


I can run the code through a windows application with everything
working fine. In this situation I have:


Windows form front end Calling Middle tier .net assembly
Middle tier calls Interop.dll.


When I test the code using an ASP.Net front end, I get:


System.InvalidCastException: QueryInterface for interface
Interop.BEADocument._Documents failed. at
Interop.BEADocument.DocumentsClass.HelloWorld() at
Beacon.BusinessEntities.Document.Letter.Create(Int32
ApplicationProductID, Int32 LoanPurposeID, Int32 UserID, String
Address, String Salutation) in c:\sourcesafe\beacon net enterprise
objects\document\letter.cs:line 114 at
Beacon.BusinessComponents.DocumentManager.LetterManager.CreateKFI(XmlNode

xn) in c:\sourcesafe\beacon net enterprise
objects\documentmanager\lettermanager.cs:line 54"


I have added a method "HelloWorld" to test basics of object. The vb6
dll has been recompiled, registered before the interop was created.


In my web page I have set directive AspCompat="true"


In the web.config, I have set <identity impersonate="true" />


Before the error above, I was getting a "Permission Denied" error on
the call to the vb6 object.


Any help greatly appreciated!


Toby

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com