Solved

Not closing Excel Application in ASP.NET

Posted on 2002-07-25
5
274 Views
Last Modified: 2008-02-26
Hello Experts,

I am calling Excel Application in ASP.NET to create excel file and charts. It is working fine but it is not closing the opened instance of the Excel Application.

I am using the following code to Save the file and close the application.

AppExcel.DisplayAlerts = False
AppExcel.ActiveWorkbook.SaveAs(strFile)
AppExcel.ActiveWorkbook.Close()
AppExcel.Quit()
AppExcel = Nothing

Then I have added another two lines of code

Response.Cache.SetExpires(Now)
Response.Cache.SetCacheability(HttpCacheability.NoCache)

Now the application is closing some time but not always.

Please help me to solve this problem.

Many thanks in advance.

Siva
0
Comment
Question by:NellaiSiva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 8

Expert Comment

by:zlatev
ID: 7233712
Try to disable ASP sessions and ASP caching. This can be done from IIS menagement console, properties on Default Web-Site, Home Directory, Configuration, App Options.

HTH
0
 

Accepted Solution

by:
NellaiSiva earned 0 total points
ID: 7237941
Hi zlatev,

I have tried all the options you have mentioned but it is not closing the Excel Application.

So that, I have solved the problem by creating a DLL in VB and using the same in ASP.NET. Now it is working fine.

Thanks for your comments.

Siva
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9421039
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ/Refund

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0
 
LVL 8

Expert Comment

by:zlatev
ID: 9426865
I agree. It seems to be a configuration problem. However the asker did not succed to solve it by method recommended by me. However s/he has mentioned workaround method that solves the issue.
0

Featured Post

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question