문제

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