|Can anyone help me on this:
I was trying to access my IP camera and used the following code
string sourceURL = "ipaddress";
byte buffer = new byte;
int read, total = 0;
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(sourceURL);
req.Credentials = new NetworkCredential("username","password");
WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();
while ((read = stream.Read(buffer, total, 1000)) != 0)
total += read;
Bitmap bmp = (Bitmap)Bitmap.FromStream(
new MemoryStream(buffer, 0, total));
but when i compiled the code, the following message will be displayed what can I do to solve this?
"Grab Error: System.Net.WebException:The remote server returned an error:(400)Bad request. at System.Net.HttpWebRequest.GetResponse()"
Thanks for your help.