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
Solved

System.Runtime.InteropServices.COMException

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 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