I have an MVC3 C#.Net web app. I am using the Aspose library to read an Excel file using the WorkBook.LoadData() method. I am able to Load a file from my local machine when running in Visual Studio. I am able to load a file from the web server when running the web site. However, when running the website, I cannot load an Excel file from my local machine. I get the following error

"Unable to open specified Excel Workbook: Could not find a part of the path"

When I grab the path it says it can't fins and use my "Run" command...it finds the file. So, it must be a permissions issue. I am sure there is a simple fix but I don't know what it would be. Any Ideas?

有帮助吗?

解决方案

As I suspected, it was a permissions issue. It was not an Aspose issue. I used the MS Interop library to run ImpersonateUser() using a service account that has access to the external machines

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top