Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在C#.net中在服务器端获取并验证NSData(图像的)_C#_.net_Iphone_Objective C - Fatal编程技术网

在C#.net中在服务器端获取并验证NSData(图像的)

在C#.net中在服务器端获取并验证NSData(图像的),c#,.net,iphone,objective-c,C#,.net,Iphone,Objective C,我通过点击提交按钮向服务器发送post请求,并发送图像数据和aspx表单本身。这是我的密码 NSURL *postURL = [NSURL URLWithString:urlName]; //..... this is my url name..... NSMutableURLRequest *postRequest = [NSMutableURLRequest requestWithURL:postURL]; [postRequest setHTTPMethod:@"POST"];

我通过点击提交按钮向服务器发送post请求,并发送图像数据和aspx表单本身。这是我的密码

 NSURL *postURL = [NSURL URLWithString:urlName];   //..... this is my url name.....
 NSMutableURLRequest *postRequest = [NSMutableURLRequest requestWithURL:postURL];
 [postRequest setHTTPMethod:@"POST"];
 NSString *stringBoundary = @"0xKhTmLbOuNdArY---This_Is_ThE_BoUnDaRyy---pqo";
 NSString *headerBoundary = [NSString stringWithFormat:@"multipart/form-data;boundary=%@",stringBoundary];
 [postRequest addValue:headerBoundary forHTTPHeaderField:@"Content-Type"];
 NSMutableData *postBody = [NSMutableData data];
 [postBody appendData:[[NSString stringWithFormat:@"--%@\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]];
[postBody appendData:[@"Content-Disposition: form-data; name=\"media\"; filename=\"myemailcheck_kiransalke@yahoo.com.png\"\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[postBody appendData:[@"Content-Type: image/png\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[postBody appendData:[@"Content-Transfer-Encoding: binary\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[postBody appendData:imgdata];
[postBody appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[postBody appendData:[[NSString stringWithFormat:@"--%@--\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]];
[postRequest setHTTPBody:postBody];
NSData *responseData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&err];
我的问题是,如何在服务器端获取和解码图像数据。我正在使用“C#Net”。所以,请用.net语言给我解答

请帮我解决这个问题