Hi All,
I have a simple master and content page and have uploaded to my web server. The site runs locally fine but when I run it from the server I get An Application Error Occured On The Server!
Any help please,
Jiggy!
Printable View
Hi All,
I have a simple master and content page and have uploaded to my web server. The site runs locally fine but when I run it from the server I get An Application Error Occured On The Server!
Any help please,
Jiggy!
What type of error do you get?
Sorry; I have the following error:-
Code:Parser Error Message: Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
Hey,
Looks to me like you have added a reference in your project to the Office Interop DLL's, but you haven't included them in the version that you have uploaded to the server.
Gary
In the bin folder I have Interop.Microsoft.Office.Core.dll but it is looking for Microsoft.Office.Excel.dll. I have search my PC and this file does not exist.
I think the problem is that you don't have Office installed on your production server
Hey,
Do you have an explicit reference to that DLL in your application?
I have never really done much office development, and I don't know the in's and out's of what is required on a server hosting an application that integrates with office. It is my understanding that you shouldn't need a full office installation, but exactly what you do need installed, I am not sure.
Gary
i worked with Interop.Microsoft.Office few months ago and it also work fine on my cpu but on our server it fail to work because it didn't had office installed, i read somewhere that you can install "PIA" something... for this to work, but when i d/led it i couldn't complete the installation (can't remember why...)
Hey,
Jigabyte, this is bordering on being specifically an Office Development question. Granted, you are doing an ASP.Net Application, but this issue would be the same if you are trying to deploy a windows application onto a machine that didn't have office installed.
I think we should maybe ask to get this moved again, as koolsid and rob are probably best placed to answer it.
Gary
OK thanks all for your help. I think I will have to resort to plan B which is to create Excel Templates for each report and create some VBA code to allow the user to select a CSV file which will come from my web application as an email. I would have like to create the spreadsheet on the web server but I don't have the experience and I need this sorting before the Christmas hols.
You'll need the Primary Interop Assemblies installed on the server, which contain the core Office assemblies that you're referencing. Because you're talking to COM DLLs, they do need to be installed. Ask your host if it's there. If you have full control, you can install it. If it's a shared host, you'll have to ask them, and they will say no.
There's a dirty way to create XLS files - you write the data you want in the Excel file as an HTML page with <table> tags etc, but you set the content type to the Excel content type.
Another way is to simply write your CSV or TSV out, with the Excel content type. The Content Type you want is application/vnd.ms-excel.