ASPOSE.cells Web Deployment (Permissions?) Error

Good Morning,

We are evaluating ASPOSE.cells in our group to see if it will work for importing Excel spreadsheets into our Web Application. I have successfully deployed the application, but when I try to import an Excel file, I get the following error. Note, this works just fine when running the application locally, and we only get the error when we deploy the application and try to run the application on the Web Server:

An Error Occurred While Processing Your Request

****Error or Exception encountered:

Error Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Error Source: System.Web

Inner Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'F:\QiDataEntry_16.xls'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.Open(String path, FileMode mode) at QualityInsight.WebSite.AuditImport.btnImport_Click(Object sender, EventArgs e) in F:\jobs\projects\QualityInsightApplication\Build_RB_2_5_x\QualityInsight.WebSite\AuditImport.aspx.vb:line 143 at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Error Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.Open(String path, FileMode mode) at QualityInsight.WebSite.AuditImport.btnImport_Click(Object sender, EventArgs e) in F:\jobs\projects\QualityInsightApplication\Build_RB_2_5_x\QualityInsight.WebSite\AuditImport.aspx.vb:line 143 at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Any thoughts?

Thank You,

Kevin Gordon

Hi,

Thanks for providing us some details.

Well, I think your issue may be caused by security permission sets for the IO operation as per your your mentioned stack trace and nothing to do with Aspose.Cells APIs. I think you are not allowed to access the file system completely or you are not specifying the file path correctly. To confirm this exception, you may try to use your own codes to read/write files (using System.IO namespace APIs) and without involving/ using Aspose.Cells, you would get the similar error. I think you need to modify the proper security settings for your requirements. You may try to assign Administrative role for your web application or project on your server.

Moreover, for your information, Aspose.Cells may not work well on medium or partial trust environment with limited permissions set, see the document for your reference: http://www.aspose.com/docs/display/cellsnet/Declaration

Hope, this helps a bit.

Thank you.