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


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
COM Component Compatibility

Try changing your page directive:

<%@Page AspCompat="true" .... etc
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?

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)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.