Good Afternoon and Happy Friday! I have created an ASP.Net page that takes any amount of rtf documents and combines them into one. The rtf documents are chosen by the client from a list, and the list contains about 33 rtf documents. I don't use automation or anything like that just simply open the file and transfer all but the first 101 characters(which is the rtf header) and the last '}'. It seems to work just fine until all 33 are selected then I get 'Out of Memory' errors and IIS crashes. The average file size for the rtf is 18meg. I see IIS go from the normal 50meg all the way up to 510megs, then it crashes. I venture to say it could be because garbage collection hasn't started actually releasing the now closed files from memory. I AM setting my file and stream readers to null when im done.
My solution that I am playing around with is this: Build a webservice(not true 'service' per say, dll in IIS) that listens for a request from the website. The Website passes in an Object[] that contains all the information it needs to combine the documents. The webservice takes care of opening and writing to the final document with all selected rtf files included. The website waits until the Webservice sets the 'Complete' to true. Then shows the Complete page. The reason for this solution was that maybe a Windows type application will utilize the memory better than an ASP.Net app would. I was also thinking of maybe using a Windows type App like this because I could then use the RTF Control in Windows and open and modify the Rtf files from there, this way I don't have to loop through the whole file and possibly making it faster. Does it sound like a viable solution? I cant use Automation because, as well all are aware, Word is a memory hog and each time someone access the page it opens an instance of Word. Not to mention they don't want to install Word in the server. There are going to be at least 20 people creating these documents at any given time. Any help or advice would be greatly appreciated. Steve __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com