Shuvro Pall

Shuvro Pall

  • NA
  • 134
  • 373.3k

Bluetooth File Transferring Problem

Oct 8 2011 1:56 PM
I am new in Bluetooth programming.In an application i face a problem during sending file from my computer to my mobile.In my program i first detect enabled bluetooth devices by a search button and then set connections with them by a connect button..it works as well.but when i try to send a file it shows exception which names WebException and cannot send any file.Here is the code:


public OpenFileDialog ofd;

string filename = System.IO.Path.GetFileName(ofd.FileName);
String adr = "0025677FB346";
Uri u = new Uri("obex-push://" + adr.ToString() + "/" + fileName);
ObexWebRequest owr = new ObexWebRequest(u);
owr.ReadFile(ofd.FileName);
ObexWebResponse response = (ObexWebResponse)owr.GetResponse(); //Exception shows here
response.Close();


I don't know what is the cause of this exception and how can i solve this problem.Can you give any idea?or are there any easy way to send file via Bluetooth?Thanks for any suggestion.

Answers (1)