I have hosted my web application which uses Excel Data Reader in Hostgator shared hosting server. I am getting the foll. error. What needs to be done to fix it?
Locally in my dev box, everything works sweet.
Error details:
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.IO.Path.GetTempPath()
at Excel.Core.ZipWorker..ctor() in exceldatareader-82970\Excel\Core\ZipWorker.cs:line 69
at Excel.ExcelOpenXmlReader.Initialize(Stream fileStream) in exceldatareader-82970\Excel\ExcelOpenXmlReader.cs:line 313
at Excel.ExcelReaderFactory.CreateOpenXmlReader(Stream fileStream) in exceldatareader-82970\Excel\ExcelReaderFactory.cs:line 74
Comments: ** Comment from web user: ozomatzin84 **
Locally in my dev box, everything works sweet.
Error details:
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.IO.Path.GetTempPath()
at Excel.Core.ZipWorker..ctor() in exceldatareader-82970\Excel\Core\ZipWorker.cs:line 69
at Excel.ExcelOpenXmlReader.Initialize(Stream fileStream) in exceldatareader-82970\Excel\ExcelOpenXmlReader.cs:line 313
at Excel.ExcelReaderFactory.CreateOpenXmlReader(Stream fileStream) in exceldatareader-82970\Excel\ExcelReaderFactory.cs:line 74
Comments: ** Comment from web user: ozomatzin84 **
I have the same problem, I try to read an Excel (xlsx) file but I get this error, just with the new version of the excel files (xlsx) with the old version (xls) I don't have any problem. how did you fix this error?