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?
You should've told me about this earlier.
I'm a programmer in this company and nothing much to do.
I won't and not going to do something useless for them if they didn't ask.
This application is what they want, not me.
I'm angry because I can't fullfill what they want.
Sorry for misunderstanding.
Oh ya, I didn't log their key, I only count how many times they typed.