Response.TransmitFile Response.WriteFile SSL HTTPS

Discussion in 'ASP .Net' started by Ryan Pedersen, Jul 10, 2005.

  1. I have been trying to figure out how to transmit a file back to a user using the response.transmitfile or response.writefile method and just not having much success.

    I have a dell server running windows 2003 web server edition fully patched. The files are physically on the same web server. The entire site is HTTPS... it has to be because it is a financial site.

    With SSL on I cannot get TransmitFile or WriteFile to work (all files are less than 1 MB). The save box comes up just fine but when I click save... nothing happens.

    If I turn off SSL TransmitFile doesn't work. But I can use WriteFile in this configuration and it does work.

    Please... any suggestions that you have I am open to all of them.

    Best regards,
    Ryan





    --------------= Posted using GrabIt =----------------
    ------= Binary Usenet downloading made easy =---------
    -= Get GrabIt for free from http://www.shemes.com/ =-
     
    Ryan Pedersen, Jul 10, 2005
    #1
    1. Advertising

  2. You should not use the built in method for such big downloads. Use

    Context.Response.Buffer=false;
    FileStream inStr = null;
    byte[] buffer = new byte[1024];
    long byteCount;

    inStr = File.OpenRead(filePath);
    while ((byteCount = inStr.Read(buffer, 0, buffer.Length)) > 0)
    {
    if(Context.Response.IsClientConnected)
    {
    Context.Response.OutputStream.Write(buffer, 0, buffer.Length);
    Context.Response.Flush();
    }
    }

    instead and sent the file bitwise.

    --
    Daniel Fisher(lennybacon)


    "Ryan Pedersen" <> wrote in message
    news:5E9Ae.42879$...
    >I have been trying to figure out how to transmit a file back to a user
    >using the response.transmitfile or response.writefile method and just not
    >having much success.
    >
    > I have a dell server running windows 2003 web server edition fully
    > patched. The files are physically on the same web server. The entire site
    > is HTTPS... it has to be because it is a financial site.
    >
    > With SSL on I cannot get TransmitFile or WriteFile to work (all files are
    > less than 1 MB). The save box comes up just fine but when I click save...
    > nothing happens.
    >
    > If I turn off SSL TransmitFile doesn't work. But I can use WriteFile in
    > this configuration and it does work.
    >
    > Please... any suggestions that you have I am open to all of them.
    >
    > Best regards,
    > Ryan
    >
    >
    >
    >
    >
    > --------------= Posted using GrabIt =----------------
    > ------= Binary Usenet downloading made easy =---------
    > -= Get GrabIt for free from http://www.shemes.com/ =-
    >
     
    Daniel Fisher\(lennybacon\), Jul 12, 2005
    #2
    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. Martin Knopp
    Replies:
    6
    Views:
    573
    Hermit Dave
    Jan 29, 2004
  2. Replies:
    3
    Views:
    5,700
  3. =?Utf-8?B?T2N0QEVTSQ==?=

    Response.TransmitFile fail in the middle for modem user?

    =?Utf-8?B?T2N0QEVTSQ==?=, Apr 23, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    970
    =?Utf-8?B?T2N0QEVTSQ==?=
    Apr 26, 2005
  4. Ryan Pedersen

    Response.TransmitFile not working in HTTPS

    Ryan Pedersen, Jul 11, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    760
    Ryan Pedersen
    Jul 11, 2005
  5. =?Utf-8?B?Um9iZXJ0UA==?=
    Replies:
    0
    Views:
    2,702
    =?Utf-8?B?Um9iZXJ0UA==?=
    Jul 20, 2005
Loading...

Share This Page