Creating a ASP mobile app download page

Hi

I’m new to ASP.NET so I’m hopping the following question can be easily answered by you experienced developers out their.

I want to create a web service which will initiate a download with the client, the file being sent to the client will depend on a “downloadID” query string that the client post’s to my service.

I know how to map this “downloadID” to the specific file to be downloaded, what I don’t know is how to respond to the client with some sort of download initiation.

I just need to be pointed in the right direction.

Thanks



Answer this question

Creating a ASP mobile app download page

  • Martin Sommer

    Here is some more info.

    I am using an ASP.net mobile application project.

    I want the user to visit my download site by following a URL that is supplied in an SMS message. This URL has a downloadId query string appended to the end.

    I am using the code below to check if the downloadId is valid and then if the users device can support MIDP 1.0 or higher.

    If all is good I then want to write out a file in the response.

    From IE the file download is displayed as just text on the download page and from a mobile phone the page is not displayed because of an error.

    Do I have to do something with the mime type

    private void Page_Load(object sender, System.EventArgs e)

    {

    try

    {

    //get the configuration for the page instance, e.g. Query String data

    JavaLoaderConfig config = AdminClasses.LoadConfig(

    ConfigServices.AppConfigDirectory+@"\java_loader_config.xml", Request);

    //check the midp version

    MidpVersionResult midpResult = AdminClasses.CheckMidpVersion(config, Request);

    Response.WriteFile(@"C:\midlet download\temp jad\file.jar");

    Response.Flush();

    }

    catch(Exception ex)

    {

    }

    }


  • sfbolder

    I would suggest looking at WSE 3.0 and MTOM. That's what I would do.

    http://www.microsoft.com/downloads/details.aspx familyid=018a09fd-3a74-43c5-8ec1-8d789091255d&displaylang=en

    Jason


  • Creating a ASP mobile app download page