I am trying to display a video from my ip camera on a panel. I have used an "http request" to get the video from the camera and i got a problem with displaying the video on the panel, so i need a help please?
am using c#, on visual studio 2010, windows form application...
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()"
Due to the above, I have the following questions:
1. if I want to change the statement to select either "*bErrorReport.xlsx" or "*dErrorReport.xlsx" or "*ErrorReport.xlsx",
how would I change the statement I just displayed?
2. The above statement picks 3 excel spreadsheets and there are really only two excel spreadsheets. The excelspreadshets that are valid
The invalid value that is selected is
Can you show me the code, so an invalid spreadsheet called ~customer_number_bErrorReport.xlsx is not selected?