HI Guys

I Want to create service which monitor the another service in server,I search in google and find the coding part to do that,It works for local machine without any problem ,but I configure it to remote computer,it gave me error called "The RPC server is unavailable".I cant do any configuration in server.Pls tell me an idea to do this.Without do any configuration to server.I dont know what is best to do ,Pls give me an idea how to do this.

Thanks
Tank50

HI

Belwo I mentioned coiding What I wrote,This Is coding I used,This is not about process ,but this coode also gave me an error"RPC unavaliable".

//Specify the Adminstrator's Username and Password
            ConnectionOptions co = new ConnectionOptions();
            co.Username = "Administrator";
            co.Password = "password#xyz";

            //Connect to the default namespace on Remote Machine
            ManagementScope scope = new ManagementScope(@"\\[REMOTE MACHINE]\root\cimv2", co);   
       
            SelectQuery query = new SelectQuery("SELECT * FROM Win32_LogicalMemoryConfiguration");

            ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);

            foreach (ManagementObject mObj in searcher.Get())
            {
                foreach (System.Management.PropertyData property in mObj.Properties)
                    System.Console.WriteLine(property.Name.PadLeft(25,' ') + ": " + property.Value);
            }            
            Console.ReadLine();
        }
    }

Thanks
Tank 50

You may want to put the machine name in with the username so it reads

server01\Administratr
passwordxyz

but you didnt confirm rpc is actually running - oh and is there any chance thers a firewall? (eg windows etc)

HI
This is error I have once I run the coidng
The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
Is RPC Mean service?
Yes there is firewall in thata server,cant stop that,they will kill me if i do that.

Is RPC Mean service?
Yes there is firewall in thata server,cant stop that,they will kill me if i do that.

RPC is a service - you need to be sure its running on the receiving server

second, if theres a firewall and you cant stop it, then theres a big chance you cant do what you are trying to do.

Hi Guys

In my local machine the RPC already started.Is there anyway to do this.I have an idea Once service is stop I created file(xml) and transfer it to my machine for specific location ,once I get that file I generate something(beep sound,Write Log file).what u think?
Is this stupid things to do

Thanks
Tank50

you need to check the rpc service on the remote machine

you are saying transfer your xml file from the remote machine all the information you need? or you are transferring to the remote machine?

HI

Yes RPC in server machine is already running.Yes I am telling transfer file from server to my machine?is this possiable,because firewall is running.

Thanks
Tank50

Yes you can do it, either make sure there is either a mapped drive, or it can be shared, if you run into problems with the firewall make sure file sharing is enabled in the firewall, i believe it is ports 135-139 if you run into problems

Depends a lot on what the firewall blocks - and wether you can get ports opened etc.

This article has been dead for over six months. Start a new discussion instead.