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