Excel in ASP.NET

  • Thread starter Thread starter Dan Fergus
  • Start date Start date
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
 
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
 
I'm having the very same problem...

This Interop requires Full Trust server... Which is unacceptable for shared hosting (Usually, Medium trust)...

i'm trying to work with perl, but all that i can see is a lot of work and too few success...


christiano..



"Dan Fergus" <[email protected]> escreveu na mensagem 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
 
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
 
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.
 
Back
Top