This is the problem:
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse: &resp error: &err];
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES];
First you start a synchronous request and then you start the request again but than asynchronous. Makes no sense.
Try removing the first line.
St3fan
2010-01-23 15:15:14