• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1010
  • Last Modified:

I'm having problems accessing a COM+ object from ASP.NET in IIS Website mode

I get this error:

Unable to cast COM object of type 'ProntoUtility25.PUtility25Class' to interface type 'ProntoUtility25._PUtility25'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{88589C5C-709D-4823-AE5E-67BA25C5639E}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

I've attached a screenshot of my relevant code.  I get the error when I make the call on line 12 (see screenshot) and when I open the Web Site through the File System way and run it on Cassini it works fine but when I open the Web Site through the Local IIS way and run it through IIS it gives me that error (above).  Obviously, I eventually have to run it on IIS so I'm concerned about getting it to work through that method right away.

And by the way, viewing all the other files on the site through IIS work just fine - as long as they are not calling the COM+ stuff through ASP.NET.  I have classic asp on there that call the COM+ just fine and work as they should and other ASP.NET files on there that work just fine as long as they are not calling the COM+.  

TIA!!


Capture.JPG
0
edenmachine
Asked:
edenmachine
  • 3
1 Solution
 
edenmachineAuthor Commented:
Oh and the COM+ DLLs are registered on the same machine through component services and I added by a Reference in the Bin folder for the asp.net Web Site.
0
 
PaulHewsCommented:
COM Component Compatibility
http://msdn2.microsoft.com/en-ca/library/zwk9h2kb.aspx

Try changing your page directive:

<%@Page AspCompat="true" .... etc
0
 
pkumarraCommented:
0
 
edenmachineAuthor Commented:
RE: PaulHews: The AspCompat="true" by itself didn't solve the problem.

RE: pkumarra: Are you referring to the Interop version of the DLL or the Component Services registered version?

0
 
edenmachineAuthor Commented:
I added readonly access to the registered DDLs for IIS_WPG and that fixed the problem.  Not sure how many other security problems that I might get from that now but at least it's a start.  (thanks PZ)
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now