Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

System.Runtime.InteropServices.COMException

Posted on 2011-03-21
3
Medium Priority
?
1,115 Views
Last Modified: 2012-05-11
System.Runtime.InteropServices.COMException (ASP > ASP.NET - Windows Server 2003 Only)

Hello. I have an ASP Page (Works on WinXP / Win2003) and converted it to ASP.NET.  The ASP.NET page views in WinXP and Win2003 but whenever I try to call a specific method, via a button, then I get the following Error:

 The remote procedure call failed. (Exception from HRESULT: 0x800706BE)  ON  mySessonOb.myMethod(1, 1, 0);

 This only occurs on Windows Server 2003 (The page and method call works perfectly in Windows XP).  If I try again (without closing the browser first) I get "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)", but I dont' think this is relevant (since the 1st error is what always happens first).

Some notes:  The site uses other COM objects that are working with both Win2003 and WinXP.  Win2003 has "NETWORK SERVICE" permissions set on all the COM objects and WinXP has "ASPNET" permissions set.  The only difference with this object is that its being set in the global.asax file by the following
0
Comment
Question by:Asim Nazir
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
khan_webguru earned 2000 total points
ID: 35179835
1- It turns out that there was some kind of permission that the COM Object needed.  Setting the AppPool (for the site) on the Win2003 server to "SYSTEM" fixed the problem.  For some reasion (by Default) the ASPNET account has permission to whatever the COM object was trying to access.

If you find access denied error on that the apply  "impersonate"

add this line in web.config
2- <identity impersonate="true" userName="abc" password="oo" />

hope this will solve your problem.

CHEERS!

ASIF KHAN
0
 
LVL 10

Author Comment

by:Asim Nazir
ID: 35180051
Thanks khan! Perfect solution.
0
 
LVL 10

Author Closing Comment

by:Asim Nazir
ID: 35180058
Good solution
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question