469,904 Members | 2,101 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,904 developers. It's quick & easy.

Response.TransmitFile Response.WriteFile SSL HTTPS

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/ =-

Nov 19 '05 #1
1 3509
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" <rp*******@gensx.com> wrote in message
news:5E*****************@bignews6.bellsouth.net...
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/ =-

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Martin Knopp | last post: by
3 posts views Thread by jeffpriz | last post: by
reply views Thread by Thomas Andersson | last post: by
reply views Thread by Ryan Pedersen | last post: by
3 posts views Thread by Buddy Ackerman | last post: by
2 posts views Thread by Nathan Sokalski | last post: by
1 post views Thread by =?Utf-8?B?V29vZGdub21l?= | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.