Search code examples
c#authenticationsystem.diagnostics

C# opening website with authentication


i need to help about using System.Diagnostics.Process.Start(..) function with authentication .

I am using following code:

System.Diagnostics.Process.Start("http://" + textBox_Old_IP.Text + ":" + combobox_ssh.SelectedItem + "/authorize?UserName=ROOT&Password=123456&submit=")

However, It doesn't work everytime.I mean that it logins succesfully sometimes, but another time it fails and browser gives "ERR_EMPTY_RESPONSE" . Is there another way to open website with authentication? Thanks in advance.


Solution

  • Why not consider using WebClient or HttpRequest?