Solved

System.Runtime.InteropServices.COMException

Posted on 2011-03-21
3
1,099 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

763 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