Reputation: 10580
I have a tool on server that keep reading data from some data source. Sometimes I want to open a asp.net page on a browser on a specific IP.
In other words: I have a server that is connected (on LAN network) to many computers.
Is it possible/applicable to open a asp.net page on a specific IP?
I already know the IP. and I am using this code to open the page
System.Diagnostics.Process.Start(popupURL + "?CallerID=" + callerID);
it is working on the server, but how can I tell the server to open the page on a specific IP?
Upvotes: 0
Views: 378
Reputation: 156988
I want to open a asp.net page on a browser on a specific IP.
That is not possible just for any PC, but you can if the PC is controlled by a domain controller, which is very likely in a business environment. You can use WMI as explained in this answer. I altered the code to comply with your needs:
string theProcessToRun = "http://url_to_open";
string ipAddress = "0.0.0.0";
string remoteIdentifier = string.Format(@"\\{0}\root\cimv2:Win32_Process", ipAddress);
ManagementClass mc= new ManagementClass(remoteIdentifier);
mc.InvokeMethod("Create", new [] { theProcessToRun });
Upvotes: 3