RingTone FileName (.amr) is not saved on my mobile handset properly --it needs some new MIME
Dear Microsoft:
I have created a Mobile Application in C# using Visual Studio.net 2003.
I am sending a WAPPush SMS to users who may request Mobile Services such as (Ringtones, Pictures).
I have a problem in downloading ringtone(True Tone of file extension AMR) on WAP Browser, the ringtone name is not saved. After downloading the Ringtone file takes the link file name "userlink" which appears in url(ex, url: http://IP/webapplication?userlink.aspx?pwd=887768). The ringtone is saved as userlink.amr on mobile handset after downloading.
I can download file type AMR (or in MP3...) from my Web Browser but it is not saved on mobile handset in its real name just it can be heard.Moreover, the filename and length have been specified inResponse.AppendHeader tags to save the filename properly, but it doesn’t work on WAPBROWSER the way we want.
//******************************************************************************
My Code is the following: SqlDataReader ReaderObj = CmdObj.ExecuteReader(); if(ReaderObj.Read()) Response.Clear();
private void Download(int szID)
{
string szContent="";
string szType="";
string szFileName="";
SqlConnection Conn = new SqlConnection(objGeneral.GetConnect());
string sqlselect="SELECT ContentUrl,Type,ContentName FROM ContentType where ID='"+szID+"' ";
Conn.Open();
SqlCommand CmdObj = new SqlCommand(sqlselect, Conn);
{
szContent=ReaderObj.GetString(0);
szType=ReaderObj.GetString(1);
szFileName=ReaderObj.GetString(2);
FileInfo f = new FileInfo("C:\\Inetpub\\wwwroot\\MobileServices\\"+szContent);
Response.Clear();
Response.AppendHeader("Content-Disposition", "attachment;filename="+ f.Name);
Response.AddHeader("Content-Length", f.Length.ToString());
Response.ContentType=szType ;
Response.AddHeader("pragma","no-cache");
if(!ReaderObj.IsDBNull(2)) } }
{
Response.WriteFile(f.FullName);
Response.End();
else
{
Response.Write("no image exists!!");
}
ReaderObj.Close();
}
//************************************************************************************************************//
To enable the Web server to serve WAP documents, it needs some newMIME types. I found this article
http://www.pcquest.com/content/technology/101030101.aspfor generating dynamic WAP pages using ASP, PHP, Perl, or JSP.How to generate dynamic WAP pages using C#?
Please help me to fix my problem as soon as possible….there is no too much help on internet for such mobile services issues….
Best Regards,
Ranine

