Excel in ASP.NET

D

Dan Fergus

Let's try both ASp and Excel groups and see if I can get some help...

My web site loads an Excel template, populates it and redirects the user to the new file. This works great on my dev box. But when I publish it, I get the following;

Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I'm a little confused by the last line of the error, The located assembly's manifest definition does not match the assembly reference. I ony have Office 12 on this box so I'm not sure how the references could get mis-matched.

My Bin folder has Interop.Excel.dll along with office.dll.

Am I missing a file? a reference? I must be missing something :-(

Dan
 
S

sloan

Youch.

You might want to check this:

http://support.microsoft.com/kb/257757



Let's try both ASp and Excel groups and see if I can get some help...

My web site loads an Excel template, populates it and redirects the user to the new file. This works great on my dev box. But when I publish it, I get the following;

Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I'm a little confused by the last line of the error, The located assembly's manifest definition does not match the assembly reference. I ony have Office 12 on this box so I'm not sure how the references could get mis-matched.

My Bin folder has Interop.Excel.dll along with office.dll.

Am I missing a file? a reference? I must be missing something :-(

Dan
 
Z

ZSvedic

Let's try both ASp and Excel groups and see if I can get some help...

My web site loads an Excel template, populates it and redirects the user to the new file.  This works great on my dev box.  But when I publish it, I get the following;

Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I'm a little confused by the last line of the error, The located assembly's manifest definition does not match the assembly reference.  I ony haveOffice 12 on this box so I'm not sure how the references could get mis-matched.

My Bin folder has Interop.Excel.dll along with office.dll.

Am I missing a file? a reference? I must be missing something :-(

Dan

I agree with Mark that there are many automation issues on the server:
http://www.gemboxsoftware.com/GBSpreadsheet.htm#Automation

Except Aspose component, you can try GemBox.Spreadsheet Free Excel
Read/Write component: http://www.gemboxsoftware.com/GBSpreadsheetFree.htm
If you have XLS/CSV/XLSX files smaller that 150 rows it is free of
charge.

--Zeljko
 
A

Alan Moseley

Wouldn't the PIA's need to be physically installed on the server? Also I
would think that you need to modify the CONFIG files on the server to give
permission for this assembly to be used within the web application. The
following link outlines this using OleDb as an example.

http://msdn.microsoft.com/en-us/library/wyts434y.aspx

If you are using shared hosting I would be suprised if you get this working.
Most shared hosting restricts you to medium trust.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top