| | |
HTTP Request
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2009
Posts: 68
Reputation:
Solved Threads: 0
Hi,
How can I send http request for authentication?
My current code returns 401 unauthorized access
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://128.39.141.213/axis-cgi/com/ptz.cgi?camera=1&move=right");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Looking for a quick reply
Regards,
A
How can I send http request for authentication?
My current code returns 401 unauthorized access
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://128.39.141.213/axis-cgi/com/ptz.cgi?camera=1&move=right");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Looking for a quick reply
Regards,
A
•
•
Join Date: Jan 2009
Posts: 68
Reputation:
Solved Threads: 0
Even after setting the credentials, I get some sort of error for if I execute the following code/instruction for 3rd time. For the first two times, it performs well and send a http request to the network camera.
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://128.39.141.213/axis-cgi/com/ptz.cgi?camera=1&move=right");
request.PreAuthenticate = true;
request.Credentials = new NetworkCredential("root","pass");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Can anyone help?
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://128.39.141.213/axis-cgi/com/ptz.cgi?camera=1&move=right");
request.PreAuthenticate = true;
request.Credentials = new NetworkCredential("root","pass");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Can anyone help?
![]() |
Similar Threads
- HTTP request (PHP)
- Http request error when using AJAX. (JavaScript / DHTML / AJAX)
- Problem in identifying HTTP request field for enoded type (base64 or binary) (C++)
- How many PHP scripts can run concurrently via http request? (PHP)
- HTTP request in C (C)
- send http request?? (C++)
- HTTP Request Message Issue (PHP)
Other Threads in the C# Forum
- Previous Thread: sql
- Next Thread: the Brigadoon of databases
| Thread Tools | Search this Thread |
.net access ado.net algorithm array backup barchart bitmap box broadcast buttons c# check checkbox client combobox control conversion csharp custom database databasesearch datagrid datagridview datagridviewcheckbox dataset datetime degrees development draganddrop drawing dynamiccreation encryption enum equation event excel file form format formatting forms function gdi+ httpwebrequest image index input install interface java label list listbox mandelbrot math mouse mouseclick mysql namevaluepairs operator path photoshop picturebox pixelinversion post powerpacks programming property radians regex remote remoting resource restore richtextbox server sleep socket sql statistics stream string table text textbox thread time timer update usercontrol validation visualstudio wait webbrowser windows winforms working wpf xml





