Вопрос

I Have my Dot Net application where I am opening Excel file by fetching path from DB on the click of Button, It works fine, but when I host my application in IIS then i am getting following exception-

 System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC 
 at Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, 
                          Object Format, Object Password, Object WriteResPassword, 
                          Object IgnoreReadOnlyRecommended, Object Origin, 
                          Object Delimiter, Object Editable, Object Notify, 
                          Object Converter, Object AddToMru, Object Local, 
                          Object CorruptLoad)

Please Help...

Это было полезно?

Решение

I generally find these to be permissions issues with the user associated with the website in IIS. Make sure the IIS user has access to the file.

Incidentally, I might would consider using 3rd party DLLs which don't require the use of Excel Automation. I have had good success with NPOI if you don't need XLSX support. Just a suggestion.

Good luck.

Другие советы

Have you impersonate uSer refer http://support.microsoft.com/kb/306158

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top