Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Add urlacl without using cmd netsh

Hey bros.

I'm developing a little application (Windows Forms) that implemets a small web server. The idea is that this small web server can handle request like this:

1st step:
Code
This app (web server) is running on a PC with 192.168.1.23 on 25436 port

2nd step:
Code
From another PC on LAN, i.e. 192.168.1.56, if you enter this url, on any webbrowser, jQuery script or ASP.NET / PHP / .NET app:

http://192.168.1.23:25436/json/sensorID=1

The small web server processed that url and reply with a JSON message with the data for sensor X

Hope you get the idea.

The problem:

You need to 'register' the web Server. The only way I found to register programatically is using netsh with .NET Process Class:

http://stackoverflow.com/questions/25833...ster-a-uri

Do you know another way to register the url without using Process.Start();?

Thanks in advance.
What is the problem with Process.Start();?

I would like to help you, but before writing any alternative way I am advised to get to know what is the problem in the current method I want to avoid in the alternative.

Regards from
[Image: qp0UIPa.png]
The Society

(Jul 20, 2016 11:31 PM)Mefie Wrote:  
What is the problem with Process.Start();?

I would like to help you, but before writing any alternative way I am advised to get to know what is the problem in the current method I want to avoid in the alternative.

In fact there isn't no problem using netsh with Process.Start
I just wanted to know if there were other alternatives.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Mr. RobotNov 27, 2016 07:53 AM 2 126 Nov 27, 2016 07:53 AM
Last Post: Mr. Robot
[.NET] by CPAManagerFeb 4, 2016 06:38 AM 18 886 Feb 4, 2016 06:38 AM
Last Post: He B TeMy
[C] by 570703Sep 8, 2015 03:01 AM 4 204 Sep 8, 2015 03:01 AM
Last Post: 570703