How can I change the port number used by WebBrowser control? The standard port number is 80, but I would like to use a different port.
+8
A:
You should specify an alternate port number in the URL itself:
http://server:port/path?query
Mehrdad Afshari
2009-07-11 23:47:27
+4
A:
The web browser control is a client. To connect to the server on different port, you change the URL.
ex: http://www.mysite.com:81/
would attempt to connect to the site on port 81.
billb
2009-07-11 23:48:08
+1
A:
Are you asking about the System.Windows.Forms.WebBrowser class?
If so, then set the Url property using the format Mehrdad mentioned, or go there using the Navigate() method:
http://server:port/path?query
Example:
WebBrowser w = new WebBrowser();
w.Navigate(new Uri("http://server:port/path?query"));
GreenReign
2009-07-12 00:05:40
"Are you asking about the System.Windows.Forms.WebBrowser class?" - Yes
mykhaylo
2009-07-12 00:20:40
A:
If you're trying to change the local port of the web browser, I'm not sure that you can. The Windows API automatically assigns a local port to the browser.
Rob
2009-07-12 00:20:14
A:
You can use the DOS command "netstat -anb" to find out what process is holding port 81 on your machine.
djangofan
2009-07-13 18:48:26