Solved

System.Runtime.InteropServices.COMException

Posted on 2011-03-21
3
1,085 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
Comment Utility
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
Comment Utility
Thanks khan! Perfect solution.
0
 
LVL 10

Author Closing Comment

by:Asim Nazir
Comment Utility
Good solution
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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 video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now