Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Created Unassigned: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. [8770]

$
0
0
I am getting an error when I try to create an object XLWorkbook.

Code :
```
var workbook = new XLWorkbook();
```


Message that I get :

```
Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_UserName()
at ClosedXML.Excel.XLWorkbook..ctor(XLEventTracking eventTracking)
at CentralGUI.UI.Controls.ShowViewReportCountPerStopTable.ViewReportCountPerStopTableControl.ViewReportCountPerStopExportExcelButton_Click(Object sender, ImageClickEventArgs args) in c:\@work\XXXXXX\XXXXXX\Source\XXXXXX\App_Code\ViewXXXXXX\ShowViewXXXXXX.Controls.cs:line 89
```

I have added the next files to BIN Directory of my website :
* ClosedXML.dll (ClosedXML_Net3.5 version 0.68.1.0)
* DocumentFormat.OpenXml.dll (Open XML Format SDK 2.0 version 2.0.2022.0)

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>