473,804 Members | 2,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sending a file to the client

I'm sending file to the client (see sample code below) but when I send a large file the user gets a document contains no
data message.
response.conten ttype = "applicatio n/x-unknown"
myheader = "attachment;fil ename=order123. zip"
Response.AddHea der("Content-Disposition", myheader)
Response.WriteF ile(FileName, StartPos, FileSize)
I'm dynamically creating the ZIP file (prior to the above code running but in the same page). It only takes about 10
seconds to create the zip file.
The file I'm having trouble with is 112MB. It takes about 15 - 20 second to create the file. The code itself does not
create an error but the end user gets a message (from the browser) that says "the document contains no data", the
messages comes up immediately after the code has completed (this is based on me seeing the last datbase instruction
being sent which is immediately after the file creation is complete and right before the response.writef ile instruction.

I also tested the page by bypassing the code that creates the file and just had it try and send the file (since it
already existed from the previous run) but I got the same message. Funny though, the message still took about 30 second
to display.
Also to make sure that the zip file was a valid zip, I opened it in WinZip (with no problems).
Is there some kind of limit when sending files like this? Smller files seem to work fine, although I haven't determined
the threshold for failure. Would it have anything to do with the amount of available RAM?


--Buddy
Nov 19 '05 #1
0 1483

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
2516
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to the site, and then i have to select the file to upload.. i used sendkeys.. and i worked perfect.. BUT ... the computer must be locked for security ( obviusly ) reazons.. so..i think this probable solutions to unlock the computer and run the...
5
1773
by: vanisathish | last post by:
Hi All, I need to constantly update some values to the User Interface. In order to do the updation efficiently, i am planning to run some script in the server side that constantly keeps sending the values alone to the User Interface client. But i need to send some GIF files as well to change the colour of the block diagram. something like send a green arrow when the equipment is UP and red arrow gif file when its down. How can i avoid...
0
1168
by: Buddy Ackerman | last post by:
I'm sending file to the client (see sample code below) but when I send a large file the user gets a document contains no data message. response.contenttype = "application/x-unknown" myheader = "attachment;filename=order123.zip" Response.AddHeader("Content-Disposition", myheader) Response.WriteFile(FileName, StartPos, FileSize)
1
2159
by: Lars Netzel | last post by:
I have an XLS file that I try to send to the webclient via ASP.NET. When sending I use this code... Response.ClearContent() Response.ClearHeaders() Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("Content-Disposition", "inline; filename=" & ClientFilename & ".xls")
1
1847
by: Henk | last post by:
Hi, I have a problem with sending a file. I have a client application that connects to a server and sends the string "data". Then it sends a file. If the server receives "data", the method getCsv() is started (this receives the file) The file however isn't received completely (most of the time) this is my servercode:
1
1367
by: Piotrekk | last post by:
Hi I would like to ask, why when i try to open file , that has been sent - its empty. Size of sent file is proper, but for example when it's pdf - acrobat reader says " file might be damaged" Here is my send finction try { if (Client.Connected) {
1
8188
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to the members of my organization. I think my problem is incorrectly setting the settings on my server or an authentication problem. Here is the code I have written to send a test message: -----Code Begins: Sensitive Information Replaced by -----...
0
1324
by: Lee | last post by:
Hi, I am trying to send and receive a file (it is actually an xml file, however any file may possibly be sent) using;- sending ..... public void send() {
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10354
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10097
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9175
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7642
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5535
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.