473,771 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

file "killed" a few seconds after it's generated

52 New Member
Hi,

I have a aspx page that generates reports with the data it gets from databases.

It used to work quick and fine until recently when a file is generated it gets killed a few seconds after that. It can still be downloaded if fast enough:



A few seconds later...



The interesting thing is that only reports that are approximately larger than 1MB would get destroyed. Small reports would stay there forever until it's downloaded.

At first I thought the server might be out of space/memory to store the created report and asked the server admin to check. I didn't get a reply from him so it's probably caused by something else.

If anyone knows a possible reason for this problem please let me know; I've stucked on this for almost a week =(

Thanks
Feb 10 '09
18 1958
200dogz
52 New Member
@Frinavale
Hey Frinavale I think you are probably right!

This is what's being used to output the file:

Expand|Select|Wrap|Line Numbers
  1. HttpContext context = HttpContext.Current;
  2. context.Response.Clear();
  3. context.Response.AppendHeader("Content-Type", "application/msword");
  4. context.Response.AppendHeader("Content-disposition", "attachment; filename=\"report.doc\"");
  5. context.Response.Write(this.document);
  6. context.Response.BufferOutput = true;
  7. context.Response.Flush();
  8. context.Response.Close();
I will ask our admin to increase the memory allowance for each process in IIS first and see if it fixes the problem :).
Feb 13 '09 #11
200dogz
52 New Member
Umm...the problem seems to be gone after...a server reboot.

That probably means it's a resource issue?

Anyway, I believe the same problem is going to pop up again in the future but as long as there's way to resolve it I guess it's all good :)

Many thanks
Feb 18 '09 #12
NeoPa
32,573 Recognized Expert Moderator MVP
... Unless the reboot is required because of your code being resource hungry, or maybe untidy (not releasing resources it has finished with).

If that is the case, this is likely to recur.

It could all be entirely unconnected with your code too, of course.
Feb 18 '09 #13
Frinavale
9,735 Recognized Expert Moderator Expert
@200dogz
It's hard for me to tell if you're using session or not...
When you use "context.Respon se.Write(this.d ocument);" I'm not sure where you're retrieving your document from or what "this" is.

If you have more problems with this in the future, and you are changing your asp (or C#) code, feel free to ask for help in the Asp.NET forum. If you're having server problems and need assistance configuring or debugging your IIS feel free asking questions in the IIS forum.

-Frinny
Feb 18 '09 #14
200dogz
52 New Member
@Frinavale
it's just a string variable =P


@Frinavale
cool, thanks
Feb 18 '09 #15
NeoPa
32,573 Recognized Expert Moderator MVP
@200dogz
This may sound stupid from a non-asp person, but is it possible for a simple string variable to work as an object? Put another way - Can a string variable have a document property?
Feb 18 '09 #16
200dogz
52 New Member
@NeoPa
Yes that's what I've been using for all my reports. As long as the headers are set correctly you can write any string as output.
Feb 18 '09 #17
NeoPa
32,573 Recognized Expert Moderator MVP
Cool. That confirms it is simply down to my not understanding ASP.

-NeoPa <creeping quietly away - hoping nobody notices>
Feb 18 '09 #18
Frinavale
9,735 Recognized Expert Moderator Expert
Um....?
The String object doesn't have a "document" property.......
"document" is the name of your String variable right?

I think you meant to say that "this" refers to the page, and "document" is the name of a variable within the page.
Feb 18 '09 #19

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3261
by: John E. Hadstate | last post by:
Please forgive the heavy cross-posting and feel free to delete inappropriate groups when you reply. I am really at a loss and hope someone has an answer for my problems. Environment: Redhat Enterprise 3, Gnome or KDE, Generic PC, 1.5 GHz P-III CPU, 256 MB RAM, Sun JRE 1.5.0_2. (These problems present on multiple hardware configurations.
10
9782
by: Fred | last post by:
There is a setting in INIT.ORA that has the unintended side-effect of making sure the ALTER SYSTEM KILL SESSION command has immediate affect. Without this setting, I've seen some instances where the session reports as being KILLED in V$SESSION but is not physically removed until the instance is bounced. Does anyone remember this value offhand?
2
2919
by: Ajay Todimala | last post by:
Hi Folks, I am running a C++ simulation on Redhat Linux 9. It is computational and memory intensive. After running for some time it gets killed. It does not give any core dump. The following are the user limits on the system: core file size (blocks) 1000000
12
4131
by: Jose Fernandez | last post by:
Hello. I'm building a web service and I get this error. NEWS.News.CoverNews(string)': not all code paths return a value This is the WebMethod public SqlDataReader CoverNews(string Sport) {
8
5152
by: utagger | last post by:
Hi All, We have a gallery component that allows us to upload images. An Edit Image Entry user control allows the user to update an image, by replacing the current one. Oddly, after replacing an image, if the user tries to replace again within a few seconds - he gets the following error message: The process cannot access the file "...X.gif" because it is being used
5
8276
by: Steve Crawford | last post by:
This morning I got bitten by the "SELECT INTO" / "CREATE TABLE AS" from tables without OIDs bug in 7.4.1. Postmaster killed all the backends and restarted - pg was down for 2 seconds. This happened two times within a few minute period. Now I am getting 'invalid page header in block 52979 of relation "pg_attribute"' errors in the postgresql log file. I cannot reindex
4
2454
by: Alessandro | last post by:
Hi everybody, I tried to find some information about my subject with google, but I didn't find anything. I need to read a text file, process the entire content, then kill. In the meantime I have to be sure that no one could write on it. So I opened with read write lock, but when i closed it, before deleting, someone wrote something, and I lost the information because immediately after I killed it.
42
2126
by: Doug | last post by:
I am in a friendly debate with some co-workers... and my boss. We use Access 2003 for the frontend (on workstations) as well as for the backend (on a Dell PowerEdge running Windows 2000 server, SP4). We have approx. 20 users *logged in* at any one time (over 300 userid's exist), but we have never run metrics to see how many on average are accessing the database concurrently. About once every few weeks, the database mysteriously becomes...
7
9419
by: dieter | last post by:
Hi, Overview ======= I'm doing some simple file manipulation work and the process gets "Killed" everytime I run it. No traceback, no segfault... just the word "Killed" in the bash shell and the process ends. The first few batch runs would only succeed with one or two files being processed (out of 60) before the process was "Killed". Now it makes no
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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,...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9910
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
8933
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
7460
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2850
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.