System.InvalidCastException: QueryInterface for interface Excel._Application failed.

This one has me stumped, hopefully not for much longer.  Here is the situation:  A .NET web application pulls data into a sql data reader , then creates, populates, and saves an Excel File.  This error is being thrown when the application runs on the server.  This error does not occur when it is in the debugger.  I even created a modified version of the program to run on my development box (release version) and ran it with no problems.  So it looks like the object cannot be created on the server Windows 2000 for some reason, here is the kicker: It has been working fine for about two years and suddenly broke.  Any ideas?

Thanks in advance-
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Is Excel installed on the server?

This is required for creating Excel files and are the Excel versions the same?
ndegioiaAuthor Commented:
Yes MS Office 2002 is installed on the server.  The applicaiton is using the Microsoft.Office.Core object Library 11.0.  The Execl version on my dev box is 2003.  Do you think the object library needs to be for 2002; possibly Microsoft.Office.Core object Library 10.0?  Is there a way it can work with both?

That is definatly the problem. I would install Excel 2003 on the server to upgrade it and not downgrade your code to work with 2002.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ndegioiaAuthor Commented:
Thanks, I will give that a try.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.