[
  {
    "Id": "609284",
    "ThreadId": "256827",
    "Html": "\r\n<p>I am trying to extract the files from zip and it throws &quot;System.Security.Permissions.SecurityPermission&quot;</p>\r\n<p></p>\r\n<div style=\"color:black; background-color:white\">\r\n<pre> <span style=\"color:blue\">string</span> filePath = <span style=\"color:#a31515\">@&quot;c:\\FullInventory.zip&quot;</span>;\r\n        \r\n        <span style=\"color:blue\">using</span> (Stream s = File.OpenRead(filePath))\r\n        {\r\n            <span style=\"color:blue\">using</span> (Ionic.Zip.ZipFile zip = Ionic.Zip.ZipFile.Read(s))\r\n            {\r\n                <span style=\"color:blue\">foreach</span> (Ionic.Zip.ZipEntry entry <span style=\"color:blue\">in</span> zip)\r\n                {\r\n                    <span style=\"color:blue\">string</span> test =  entry.FileName;\r\n                    entry.Extract(<span style=\"color:#a31515\">@&quot;c:\\&quot;</span>);\r\n                }\r\n            }\r\n        }\r\n</pre>\r\n</div>\r\n<p></p>\r\n",
    "PostedDate": "2011-05-08T16:06:57.23-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "610119",
    "ThreadId": "256827",
    "Html": "<p>Sounds like you either don't have read permission to c:\\FullInventory.zip or write permission to C:\\. &nbsp;This has nothing to do with DotNetZip and is an issue with the Windows user account and it's associated file system permissions.</p>\r\n<p>I also find it easier to use this instead of a stream, unless you need the stream:</p>\r\n<p>\r\n<pre>var filePath = @\"c:\\FullInventory.zip\";\r\n\r\nusing (var zip = new ZipFile(filePath))\r\n{\r\n    // ...\r\n}</pre>\r\n</p>",
    "PostedDate": "2011-05-10T04:40:56.693-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]