I have some problem with uploading the data to any device. It's what i'm doing.
I'm sending one file by using Microsoft stack. The receiver is mobile device - Nokia. The first message in mobile phone is something like "Receive data from NAME_OF_SENDER?". When i choose Accept everything is ok. When i choose Reject or i don't make any choose before timeout attained client application stopped by exception:
"An unhandled exception of type 'System.Net.WebException' occurred in InTheHand.Net.Personal.dll
Additional information: Connect failed."
For this example I'm trying to send text file, smaller than 200 bytes.
This is my sending part of code:
for (ushort i = 0; i < clients_indexes.Length; ++i)
address = this.clients_array[clients_indexes].DeviceAddress;
uri = new Uri("obex://" + address.ToString() + "/" + filename);
request = new ObexWebRequest(uri);
request.Timeout = 5000;
response = (ObexWebResponse)request.GetResponse();
if (response != null)
catch (System.Net.WebException ex)
I have done some tests with much older version of 32feet (1.6) and this problem doesn't exist. I know, that in InTheHand.Net.Personal.dll is method throwing exception with value "Connect failed". Bot how can I catch it and continue sending file to next devices by using loop from above code? Like you see mine, above method doesn't work.
Thanks for any suggestions and code samples.