Windows Azure – RPC Server is unavailable error

asp.netazurecloudwindows

We are working on the Windows Azure platform. The application is working fine if we work from Visual Studio but when we deploy it to Windows Azure and tried to Run from the URL created its throwing RPC Server Unavailable. If Anyone of you people facing the same issues kindly helps us in resolving the same.

http://sharum1016854.cloudapp.net/WelcomePage.aspx –> Please click on any button then the following error is throwing.

the error we are getting is:

The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The
RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x800706ba): The RPC server is unavailable. (Exception
from HRESULT: 0x800706BA)]
LastTest.WelcomePage.btnCreate_Click(Object sender, EventArgs e) in
D:\AzureApplication\LastTest\WelcomePage.aspx.cs:35
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) +154 System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+3707

Please give some suggestions regarding the same as soon as possible…

Best Answer

The most likely reason is that your code uses an out-proc COM server that you deploy on the same machine during role startup. Later you instantiate an object in that server and COM subsystem provides you with a proxy object. The communication between your code and the COM server is done using RPC - an RPC server is started inside the out-proc COM server. Then the COM server crashes and all you have is a proxy to a now non-existing COM server (and non-existing RPC server). When you perform any call on the dangling proxy you face this error message - RPC server is unavailable.

You have to find what COM server crashes and why it does so and act accordingly.