Solved

System.Runtime.InteropServices.COMException

Posted on 2011-03-21
3
1,086 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now