Last post Dec 04, 2007 01:11 AM by yogendratrivedi
Dec 01, 2007 07:43 AM|yogendratrivedi|LINK
Hello , i am creating a mobile application in asp.net2.0 and c# .I have one page through which i can download mp3 file.
When i access this page on cell phone, it clear the first phase where user enter his email id, refrence id and transection id and move to second phase wher file name is displayed along with download button . when i click on download button a textfile is
downloaded in the mobile.
where as when i run that page in browser in my pc it work well and mp3 file is downloaded, but not in case when we download it in the cell phone.you can check this link
enter email id= email@example.com, transection id=YT9DPL4WMNPT79O , reference id= RX4IZTG1A
waiting for reply
Mobile application in asp.net
Dec 03, 2007 01:09 AM|Zhao Ji Ma - MSFT|LINK
By default, the MP3 file is downloaded fine from the site in Windows Mobile devices in my test.
Dec 04, 2007 01:11 AM|yogendratrivedi|LINK
hello Zhao Ji Ma,
Thanks for your test. For nokia and motorola mutimedia phones,this test is not successfull. What you think about that.
For the community reference please find the following reference
we have add the content type in the code and find that it save and displayed as wapauthenticate.aspx(this is name of my page) not as <filename>.mp3, opened by the media player after downloading?
string Name = dsDownload.Tables.Rows["RingtoneFileName"].ToString();
string Format = dsDownload.Tables.Rows["RingtoneFileFormat"].ToString();
string strFileName = Name + "." + Format;
//THIS CODE IS WRITTEN TO INCREMENT THE NO OF COUNT IN THE DATABASE
string originalFilename = strFileName;
string localfilename = Server.MapPath("~/RingtoneFiles") + "/" + strFileName;
WebClient req = new WebClient();
CredentialCache mycache = new CredentialCache();
mycache.Add(new Uri(localfilename), "Basic", new NetworkCredential("administrator", "admin$123"));
req.Credentials = mycache;
HttpResponse response = HttpContext.Current.Response;
response.Buffer = true;
response.AddHeader("Content-Disposition", "attachment;filename=\"" + originalFilename + "\"");
byte data = req.DownloadData(localfilename);