I have wifi connected in the devices - so this is ruled out.
The Application i have with the same following code executed is able to upload the file to a java server in the iOS 4.3 simulator but unable to upload in iOS 4.3.3 device. This is kind of strange.
ASIFormDataRequest *request_zip = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:strURL]];
[request_zip setAllowCompressedResponse:YES];
[request_zip setPostValue:@"device" forKey:@"value1"]; //pass device ID here...
//[request_zip addRequestHeader:@"Content-Type" value:@"multipart/form-data"];
[request_zip setTimeOutSeconds:20];
[request_zip setDelegate:self];
[request_zip setDidFailSelector:@selector(uploadFailed:)];
[request_zip setDidFinishSelector:@selector(uploadFinished:)];
[request_zip setFile:path forKey:path];
[request_zip startAsynchronous];
NSLog(@"%@ post length",[NSString stringWithFormat:@"%llu",[request_zip postLength]]);
The code when executed results the following output in the terminal.
Incorrect NSStringEncoding value 0x0000 detected. Assuming NSStringEncodingASCII. Will stop this compatiblity mapping behavior in the near future.
The post length printed in the console =>
0 post length
There is also a another string comes up lastly, i.e the time out message,
Request failed: The request timed out with response data
100% sure that the server is active and responds immediately for the app executed from simulator.
how is it possible to have a program running in simulator properly but not in the device?