IE and Firefox Incompatabilities with Downloader Object

    General discussion

  •  I have the following code which works perfectly in IE but not Firefox.  I get an Error 2207 on all the lines obtaining data from the sender object.

    function LoadDigitalForm(sender, args)
        _control = sender;
         // Create a Downloader object.
        var downloader = _control.createObject("downloader");
        // Add DownloadProgressChanged and Completed events.
        downloader.addEventListener("downloadProgressChanged", "OnDownloadProgressChanged");
        downloader.addEventListener("completed", "OnCompleted");
        // Initialize the Downloader request."GET", "silverlight.ashx?formid=8588", true);
        // Execute the Downloader request.

    function OnDownloadProgressChanged(sender, args)

    function OnCompleted(sender, args)
       if(sender.status == 200)
            alert(sender.getResponseText("Form.xaml")); //Firefox will bomb here
            var baseImage = sender.findName("baseImage");
            baseImage.setSource(sender, "Base Image.png"); //Firefox will bomb here
            var xamlFragment = _control.content.createFromXamlDownloader(sender, "Form.xaml"); //Firefox will bomb here
            var root = sender.findName("rootCanvas");

    Wednesday, May 02, 2007 1:11 PM

All replies

  •  I have resolved this issue with firefox.  If you are streaming a ZIP file that is dynamically generated through say an HttpHandler, you must set Response.Buffer = true otherwise Firefox will bomb.  Also, use ContentType = application/x-zip-compressed.

    Thursday, May 03, 2007 3:32 AM