-
WMI Remote Connection
I have a web application in which im trying for
WMI connection through asp.net from Computer A(windows 2003 server) to Computer B(Windows XP).
the code is as follows...
ConnectionOptions options = new ConnectionOptions();
options.Username =username;
options.Password = password;
string machinename = "*******";
// Read registry of remote machine....
ManagementScope myScope = new ManagementScope("\\\\" + machinename + "\\root\\default", options);
myScope.Options.EnablePrivileges = true;
myScope.Options.Impersonation = ImpersonationLevel.Impersonate;myScope.Options.Authentication = AuthenticationLevel.Packet;
myScope.Connect();
and the error is as follows
Server Error in '/MyApp' Application.
--------------------------------------------------------------------------------
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)]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
System.Management.ManagementScope.InitializeGuts(Object o) +711
System.Management.ManagementScope.Initialize() +162
System.Management.ManagementScope.Connect() +4
sk._Default.Page_Load(Object sender, EventArgs e) +167
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
Windows Firewall is off in both the systems and RPC and WMI service were also running.....Please help me out....
Similar Threads
-
By kundenarchana in forum .NET
Replies: 1
Last Post: 01-14-2009, 03:45 PM
-
By kundenarchana in forum .NET
Replies: 1
Last Post: 01-07-2009, 10:34 AM
-
By beachbum714 in forum .NET
Replies: 5
Last Post: 02-06-2006, 11:58 AM
-
By jggtz in forum VB Classic
Replies: 1
Last Post: 08-19-2005, 09:05 AM
-
By Onofre in forum VB Classic
Replies: 0
Last Post: 01-25-2001, 03:14 PM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks