Streaming javascript and XP Service Pack 2

Discussion in 'ASP .Net' started by Casper Hornstrup, Oct 22, 2004.

  1. I have an ASP.NET application that imports product descriptions from an
    Excel file. The Excel file is uploaded, then a background thread will start
    importing the product descriptions from the Excel file. When the Excel file
    is uploaded, the user's browser is redirected (using Response.Redirect) to a
    new page that will stream some javascript to show the progress of the
    import. I do perform a Response.Flush() after each script tag. I've included
    the contents of the page with the javascript below. The import can take
    several minutes if the Excel file is large. With IE6 on Windows Server 2003
    this works fine. Also with IE6 on Windows XP without Service Pack 2 this
    works fine. However, with Windows XP with Service Pack 2 this does not work.
    The browser does not display the page with the streamed javascript that
    shows the progress. It stays on the page where the file upload is done until
    it finally displays the "Page cannot be displayed" page. From the logs, I
    can see that the redirect is sent to the browser and that the import is
    successfully done on the webserver - but the user will never know when it is
    done. I have tried putting the website in the trusted sites, but still no
    luck. What can I do to resolve this problem?

    Casper


    <HTML><HEAD><TITLE>Importerer</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=utf-8">
    <SCRIPT>
    function up(percent) { var e = document.getElementById('divStatus'); if (e)
    { e.innerHTML = percent + ' % færdig...'; } }
    </SCRIPT>

    <META content="MSHTML 6.00.3790.186" name=GENERATOR></HEAD>
    <BODY>
    <DIV id=divStatus></DIV>
    <SCRIPT>up('0');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('1');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('2');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('3');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('4');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('5');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('6');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('7');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('8');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('9');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('10');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('11');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('12');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('13');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('14');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('15');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('16');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('17');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('18');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('19');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('20');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('21');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('22');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('23');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('24');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('25');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('26');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('27');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('28');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('29');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('30');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('31');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('32');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('33');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('34');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('35');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('36');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('37');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('38');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('39');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('40');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('41');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('42');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('43');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('44');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('45');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('46');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('47');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('48');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('49');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('50');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('51');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('52');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('53');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('54');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('55');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('56');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('57');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('58');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('59');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('60');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('61');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('62');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('63');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('64');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('65');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('66');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('67');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('68');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('69');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('70');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('71');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('72');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('73');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('74');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('75');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('76');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('77');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('78');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('79');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('80');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('81');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('82');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('83');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('84');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('85');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('86');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('87');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('88');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('89');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('90');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('91');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('92');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('93');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('94');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('95');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('96');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('97');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('98');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('99');</SCRIPT>
    </SCRIPT>
    <SCRIPT>up('100');</SCRIPT>
    </SCRIPT><BR><BR><FONT color=blue>Varerne er importeret med
    succes.</FONT></BODY></HTML>
    Casper Hornstrup, Oct 22, 2004
    #1
    1. Advertising

  2. Hi Casper,

    Thanks for your posting. As for the problem you mentioned, I've done some
    tests based on your description and the code snippet you provided. I also
    test on two machines one is w2k3 server IE6 AND another WIN XP with sp2
    and IE6. However, it seems that the script can run correctly on my side.
    Also, here is a kb article mentioned the script in local html which
    reference a local htc or xml file will not work, you may have a look to see
    whether it applys:

    #Scripts may not run on a local HTML Web page that references .htc or .xml
    files in Windows XP Service Pack 2
    http://support.microsoft.com/?id=884322

    Also, I'll paste my test page's code at the bottom. You may also have a
    test on yourside to see whether it works. Hope helps.


    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    ================test page (Only the Page_load function in code
    behind)========================

    private void Page_Load(object sender, System.EventArgs e)
    {
    string strStart = @"<HTML><HEAD><TITLE>Importerer</TITLE>" +
    "<META http-equiv=Content-Type content='text/html; charset=utf-8'>"+
    "<SCRIPT>"+
    "function up(percent) { var e = document.getElementById('divStatus'); if
    (e)"+
    "{ e.innerHTML = percent + ' % finished...'; } }"+
    "</SCRIPT>"+
    "<META content='MSHTML 6.00.3790.186' name=GENERATOR></HEAD><BODY><DIV
    id='divStatus'></DIV>";

    Response.ClearContent();
    Response.Write(strStart);
    Response.Flush();


    for(int i=0;i<100;i++)
    {
    Response.Write("\n<SCRIPT>up('" + i + "');</SCRIPT>");
    Response.Flush();

    System.Threading.Thread.Sleep(500);
    }

    Response.Write("<br></br><font size ='30'>Task
    Finished!</font></body></html>");
    Response.End();




    }
    Steven Cheng[MSFT], Oct 25, 2004
    #2
    1. Advertising

  3. Hi Steven.

    Thanks for your answer. I'm not sure why I didn't notice it before
    but there was output an extra </script> tag in my progress page. Removing
    that and the XP SP2 machine can also display the progress page. I guess
    the new IE is a bit more critical about what it processes. It would be nice
    if IE
    would tell me that the script is not valid instead of waiting a few minutes
    and
    display the "Page not found" dialog ;-)

    Casper

    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > Hi Casper,
    >
    > Thanks for your posting. As for the problem you mentioned, I've done some
    > tests based on your description and the code snippet you provided. I also
    > test on two machines one is w2k3 server IE6 AND another WIN XP with sp2
    > and IE6. However, it seems that the script can run correctly on my side.
    > Also, here is a kb article mentioned the script in local html which
    > reference a local htc or xml file will not work, you may have a look to

    see
    > whether it applys:
    >
    > #Scripts may not run on a local HTML Web page that references .htc or .xml
    > files in Windows XP Service Pack 2
    > http://support.microsoft.com/?id=884322
    >
    > Also, I'll paste my test page's code at the bottom. You may also have a
    > test on yourside to see whether it works. Hope helps.
    >
    >
    > Regards,
    >
    > Steven Cheng
    > Microsoft Online Support
    Casper Hornstrup, Oct 25, 2004
    #3
  4. Hi Casper,

    Thanks for the followup. Glad that the problem is figured out.
    Have a good day!

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    Steven Cheng[MSFT], Oct 26, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2ltb24gQ2hlc3Rlcg==?=

    Problems with Windows 2003 Service Pack 1 and IsolatedStorage

    =?Utf-8?B?U2ltb24gQ2hlc3Rlcg==?=, Jun 22, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    583
    =?Utf-8?B?U2ltb24gQ2hlc3Rlcg==?=
    Jun 22, 2005
  2. MarkD
    Replies:
    0
    Views:
    859
    MarkD
    Aug 3, 2005
  3. Tim Jones
    Replies:
    0
    Views:
    377
    Tim Jones
    Jan 31, 2004
  4. jonathan
    Replies:
    4
    Views:
    99
    jonathan
    Dec 4, 2004
  5. Alexander Farber

    pack 'C3U*' not same as pack 'C3(xC)*'

    Alexander Farber, Jun 23, 2005, in forum: Perl Misc
    Replies:
    2
    Views:
    134
    Ilmari Karonen
    Jun 23, 2005
Loading...

Share This Page