I\'m getting a error when I try to debug a code that reads Excel files. I\'m wondering if the reference to \'Microsoft.Office.Interop.Excel._Application\' is wrong, I get th
It sounds like you have a bad reference, not bad code. Has this code ever worked? Have you tried removing the reference to the Excel Interop and re-adding it again? Since it doesn't even get into your method, my assumption is that when the system tries to load the reference dll, it crashes.
vcsjones commend got me on the correct track. after turning off Embedding Interop Assemblies I needed to edit the web.config to trust Excel
<system.web>
<trust level="Full" originUrl="" />