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: sholle **
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: sholle **
I'm not sure but I would suspect that your web app doesn't have the same permissions as your account in the dev box. I'm pretty sure that is how it should be.
Anyone with more web experience have a more specific answer?