[
  {
    "Id": "425022",
    "ThreadId": "207670",
    "Html": "<p>&nbsp;</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Blue\">Hi, when i trying add local disk into Zip i have &quot;Unauthorized access exception&quot;, i read the documentation, but not find solution.&nbsp;</span></pre>\r\n<pre><span style=\"color:Blue\">Maybe you can help me.</span></pre>\r\n<pre><span style=\"color:Blue\">private</span> <span style=\"color:Blue\">void</span> zipFile()\r\n        {\r\n            <span style=\"color:Blue\">using</span> (zip = <span style=\"color:Blue\">new</span> ZipFile())\r\n            {\r\n                zip.ZipError += <span style=\"color:Blue\">new</span> EventHandler&lt;ZipErrorEventArgs&gt;(zip_ZipError);\r\n                zip.ZipErrorAction = ZipErrorAction.InvokeErrorEvent;\r\n                zip.AddDirectory(<span style=\"color:#A31515\">@&quot;C:\\&quot;</span>);\r\n                zip.Save(<span style=\"color:#A31515\">@&quot;D:\\test.zip&quot;</span>);\r\n\r\n            }\r\n        }\r\n        <span style=\"color:Blue\">private</span> <span style=\"color:Blue\">void</span> zip_ZipError(<span style=\"color:Blue\">object</span> sender, ZipErrorEventArgs e)\r\n        {\r\n            MessageBox.Show(e.Exception.Message);\r\n            <span style=\"color:Blue\">this</span>.Close();\r\n        }\r\n</pre>\r\n</div>\r\n<pre style=\"color:#000000;font-family:Consolas, 'Courier New', Courier, monospace;font-size:1em;margin:8px\"><span style=\"color:blue\">Best Regards, Sergey</span></pre>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-03-29T10:09:31.78-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "425168",
    "ThreadId": "207670",
    "Html": "<p>Sergey,</p>\r\n<p>It's possible you lack access to read or open the file you are trying to zip. It's also possible you lack the permissions to write to d:\\test.zip.&nbsp; I can't tell.</p>\r\n<p>You haven't given me an exception stack trace.&nbsp; You've only given me a message.&nbsp; That's not enough information to diagnose the situation.</p>",
    "PostedDate": "2010-03-29T16:45:48.6-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "425333",
    "ThreadId": "207670",
    "Html": "<p>Dear Cheeso,</p>\r\n<p>maybe i have set my question incorrect. In previos code sample if i have errors in zip should appear a message, but i have exception. For example, when i try to zip local disk i have &quot;Unauthorized access exception&quot;. If i set zip.ZipErrorAction = ZipErrorAction.Skip i still have exeptions.</p>\r\n<p>Best regards, Segrey&nbsp;</p>",
    "PostedDate": "2010-03-30T01:40:29.77-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "425574",
    "ThreadId": "207670",
    "Html": "<p>I understand that you have received an unexpected exception.</p>\r\n<p>You haven't given me an exception stack trace.&nbsp; You've only given me a message.&nbsp; That's not enough information to diagnose the situation.</p>",
    "PostedDate": "2010-03-30T09:54:19.43-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]