File sending back to Client Browser ?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

File sending back to Client Browser ?

Guest-24

Hi,

its a great application.

its working very well to upload the file to the ASP Server PC on local HD, but how would u recommend to send the file from ASP Server PC back to the Client Brower (User) ?

I tried with standard Filestream and Response.Outputstrean.Write to send back a large File to the Browser but unfortunately it failed, coz the same error occurs if u try to upload without NeatUpload. :(

Do you have any example code or idea how to do it ?

Thanks a lot.

Reply | Threaded
Open this post in threaded view
|

Re: File sending back to Client Browser ?

Dean Brettle
Administrator
What is the error you are seeing?
--Dean
Reply | Threaded
Open this post in threaded view
|

Re: File sending back to Client Browser ?

Guest-24

Hi Dean,

its the same error if i try to upload a large file without NeatUpload with postfile and standard html input type ="file", that was the reason why im using NeatUpload atm.

The Browser says something like "Serverapplication/page not available" or "Timeout"...

But i think its the same "bug" that IIS is putting the whole file at once in the memory and the IIS Service (aspnet_wp.exe) is recycling or something.

 

What would u recommend how to send files back from HD to the Client Browser ?

Thx a lot for your help.

 

Reply | Threaded
Open this post in threaded view
|

Re: File sending back to Client Browser ?

Dean Brettle
Administrator
A few things to try:

1.  Add Buffer="false" to your <%@Page ...%> directive.  See:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconPageDirectives.asp

2.  Add "Response.BufferOutput = false;" in your code-behind.  See:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebhttpresponseclassbufferoutputtopic.asp

3. Set the httpRuntime executionTimeout attribute in your Web.config.  See:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfhttpruntimesection.asp

Hope that helps,
--Dean
Reply | Threaded
Open this post in threaded view
|

Re: File sending back to Client Browser ?

Guest-24

Hi Dean,

i will try out to disable buffering as u described in 1. and 2. asap,

and about point 3.: I already set executionTimeout & maxRequestLength in the "machine.config" to 1200 sec and 1 GB, so this should never be a problem, but without NeatUpload, i never even reached those values while the file upload aborted with an exception/error. (It does not anymore with NeatUpload now, unfortunately for file uploads not downloads back to browser :-( )

I first thought u have some methods included for the same procedure like upload, justthe other way around. :)

Anyway, im gonna test 1.&2. first. Thx again.

 

Reply | Threaded
Open this post in threaded view
|

Re: File sending back to Client Browser ?

Guest-24

Hi,

i tested it out today and unfortunately it didnt worked. :(

The Client Browser which is demanding the file via filestream and response.outputstream is giving me the message after a few secs that the serverpage is not available in big red letters...

Its kinda funny, now that the upload problem is solved, the download from server to client is a problem.

Well, i think this is the same issue with uploading large files... :(

Reply | Threaded
Open this post in threaded view
|

Re: File sending back to Client Browser ?

Guest-24

Update:

Ok, i found a workaround solution how to send back large files to web browser, it seems to work atm, but

more tests need to be done. :)

thx