[
  {
    "Id": "163082",
    "ThreadId": "48839",
    "Html": "Hi folks!<br>\r\n<br>\r\nI have a service which is developed in VB2008Pro which, of course, is .NET 3.5 based.  I have added both the Ionic.Zip and Ionic.Zlib libraries to my project references.  I have also added Ionic, Ionic.zip and Ionic.Zlib to the Imported Namespaces of the project.  As a safety measure, I also added &quot;Imports Ionic.Zip.ZipFile&quot; in the service code.  <br>\r\n<br>\r\nThis is the code of the service:<br>\r\n<br>\r\n<span style=\"font-size:13px;color:#0000ff\">\r\n<p>Imports</p>\r\n</span>\r\n<p><span style=\"font-size:13px\"> Ionic.Zip.ZipFile\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px;color:#0000ff\">\r\n<p>Public</p>\r\n</span>\r\n<p><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Class</span><span style=\"font-size:13px\"> TestService\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">    Protected</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Overrides</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub</span><span style=\"font-size:13px\"> OnStart(</span><span style=\"font-size:13px;color:#0000ff\">ByVal</span><span style=\"font-size:13px\"> args() </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">String</span><span style=\"font-size:13px\">)\r\n<p>&nbsp;</p>\r\n<p>        Timer1.Enabled = </p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">True\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">    End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">    Protected</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Overrides</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub</span><span style=\"font-size:13px\"> OnStop()\r\n<p>&nbsp;</p>\r\n<p>        Timer1.Enabled = </p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">False\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">    End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">    Private</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub</span><span style=\"font-size:13px\"> Timer1_Elapsed(</span><span style=\"font-size:13px;color:#0000ff\">ByVal</span><span style=\"font-size:13px\"> sender </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> System.Object, </span><span style=\"font-size:13px;color:#0000ff\">ByVal</span><span style=\"font-size:13px\"> e </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> System.Timers.ElapsedEventArgs) </span><span style=\"font-size:13px;color:#0000ff\">Handles</span><span style=\"font-size:13px\"> Timer1.Elapsed\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">        Call</span><span style=\"font-size:13px\"> WriteToLog(</span><span style=\"font-size:13px;color:#a31515\">&quot;Timer1 event triggered&quot;</span><span style=\"font-size:13px\">)\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">        Call</span><span style=\"font-size:13px\"> ZipMyFolder()\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">    End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">    Private</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub</span><span style=\"font-size:13px\"> ZipMyFolder()\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">        Call</span><span style=\"font-size:13px\"> WriteToLog(</span><span style=\"font-size:13px;color:#a31515\">&quot;In the ZipMyFolder routine&quot;</span><span style=\"font-size:13px\">)\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">        Try\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">            Using</span><span style=\"font-size:13px\"> zip </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> ZipFile = </span><span style=\"font-size:13px;color:#0000ff\">New</span><span style=\"font-size:13px\"> ZipFile\r\n<p>&nbsp;</p>\r\n<p>                zip.AddDirectory(</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#a31515\">&quot;c:\\MyFolder&quot;</span><span style=\"font-size:13px\">, </span><span style=\"font-size:13px;color:#a31515\">&quot;&quot;</span><span style=\"font-size:13px\">)\r\n<p>&nbsp;</p>\r\n<p>                zip.Save(</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#a31515\">&quot;C:\\MyZippedFolder.zip&quot;</span><span style=\"font-size:13px\">)\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">            End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Using\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">        Catch</span><span style=\"font-size:13px\"> ex1 </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> Exception\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">            Call</span><span style=\"font-size:13px\"> WriteToLog(ex1.ToString())\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">        End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Try\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">    End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">    Private</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub</span><span style=\"font-size:13px\"> WriteToLog(</span><span style=\"font-size:13px;color:#0000ff\">ByVal</span><span style=\"font-size:13px\"> strEntry </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">String</span><span style=\"font-size:13px\">)\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">        Dim</span><span style=\"font-size:13px\"> fso </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> Scripting.FileSystemObject\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">        Dim</span><span style=\"font-size:13px\"> ts </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> Scripting.TextStream\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">        Dim</span><span style=\"font-size:13px\"> LogFile </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> Scripting.File\r\n<p>&nbsp;</p>\r\n<p>        fso = </p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">New</span><span style=\"font-size:13px\"> Scripting.FileSystemObject\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">        If</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Not</span><span style=\"font-size:13px\"> fso.FileExists(</span><span style=\"font-size:13px;color:#a31515\">&quot;C:\\ZipLog.log&quot;</span><span style=\"font-size:13px\">) </span><span style=\"font-size:13px;color:#0000ff\">Then</span><span style=\"font-size:13px\"> fso.CreateTextFile(</span><span style=\"font-size:13px;color:#a31515\">&quot;C:\\ZipLog.log&quot;</span><span style=\"font-size:13px\">)\r\n<p>&nbsp;</p>\r\n<p>        LogFile = fso.GetFile(</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#a31515\">&quot;C:\\ZipLog.log&quot;</span><span style=\"font-size:13px\">)\r\n<p>&nbsp;</p>\r\n<p>        ts = LogFile.OpenAsTextStream(Scripting.IOMode.ForAppending)</p>\r\n<p>        ts.Write(strEntry &amp; vbCrLf)</p>\r\n<p>        ts.Close()</p>\r\n<p>        ts = </p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">Nothing\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>        LogFile = </p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">Nothing\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>        fso = </p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">Nothing\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">    End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub\r\n<p>&nbsp;</p>\r\n<p>End</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Class\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<br>\r\nIn the log, the only entry that ever shows up is &quot;Timer event triggered&quot;.  In other words, as soon as it tries to enter the ZipMyFolder routine, it skips it for some reason that I don't understand.  However, if I comment out all lines of code from Try to End Try in the ZipMyFolder routine, then the log starts to show entries of &quot;In the ZipMyFolder routine&quot;.  <br>\r\n<br>\r\nI've tried everything that I can think of but the service simply does not seem to like the library.  What did I forget to do? <br>\r\n<br>\r\nThanks!\r\n",
    "PostedDate": "2009-02-28T11:08:13.767-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163084",
    "ThreadId": "48839",
    "Html": "<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;color:blue;font-family:'courier new'\">Let's try this once again.<br>\r\n<br>\r\nImports</span><span style=\"font-size:10pt;font-family:'courier new'\"> Ionic.Zip.ZipFile</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\"> </span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;color:blue;font-family:'courier new'\">Public</span><span style=\"font-size:10pt;font-family:'courier new'\"> <span style=\"color:blue\">Class</span> TestService</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\"> </span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">    <span style=\"color:blue\">Protected</span> <span style=\"color:blue\">Overrides</span> <span style=\"color:blue\">Sub</span> OnStart(<span style=\"color:blue\">ByVal</span> args() <span style=\"color:blue\">As</span> <span style=\"color:blue\">String</span>)</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        Timer1.Enabled = <span style=\"color:blue\">True</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">    <span style=\"color:blue\">End</span> <span style=\"color:blue\">Sub</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;color:blue;font-family:'courier new'\"> </span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">    <span style=\"color:blue\">Protected</span> <span style=\"color:blue\">Overrides</span> <span style=\"color:blue\">Sub</span> OnStop()</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        Timer1.Enabled = <span style=\"color:blue\">False</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">    <span style=\"color:blue\">End</span> <span style=\"color:blue\">Sub</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;color:blue;font-family:'courier new'\"> </span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">    <span style=\"color:blue\">Private</span> <span style=\"color:blue\">Sub</span> Timer1_Elapsed(<span style=\"color:blue\">ByVal</span> sender <span style=\"color:blue\">As</span> System.Object, <span style=\"color:blue\">ByVal</span> e <span style=\"color:blue\">As</span> System.Timers.ElapsedEventArgs) <span style=\"color:blue\">Handles</span> Timer1.Elapsed</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        <span style=\"color:blue\">Call</span> WriteToLog(<span style=\"color:#a31515\">&quot;Timer1 event triggered&quot;</span>)</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        <span style=\"color:blue\">Call</span> ZipMyFolder()</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">    <span style=\"color:blue\">End</span> <span style=\"color:blue\">Sub</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;color:blue;font-family:'courier new'\"> </span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">    <span style=\"color:blue\">Private</span> <span style=\"color:blue\">Sub</span> ZipMyFolder()</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        <span style=\"color:blue\">Call</span> WriteToLog(<span style=\"color:#a31515\">&quot;In the ZipMyFolder routine&quot;</span>)</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\"> </span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        <span style=\"color:blue\">Try</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">            <span style=\"color:blue\">Using</span> zip <span style=\"color:blue\">As</span> ZipFile = <span style=\"color:blue\">New</span> ZipFile</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">                zip.AddDirectory(<span style=\"color:#a31515\">&quot;c:\\MyFolder&quot;</span>, <span style=\"color:#a31515\">&quot;&quot;</span>)</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">                zip.Save(<span style=\"color:#a31515\">&quot;C:\\MyZippedFolder.zip&quot;</span>)</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">            <span style=\"color:blue\">End</span> <span style=\"color:blue\">Using</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        <span style=\"color:blue\">Catch</span> ex1 <span style=\"color:blue\">As</span> Exception</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">            <span style=\"color:blue\">Call</span> WriteToLog(ex1.ToString())</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        <span style=\"color:blue\">End</span> <span style=\"color:blue\">Try</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">    <span style=\"color:blue\">End</span> <span style=\"color:blue\">Sub</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;color:blue;font-family:'courier new'\"> </span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">    <span style=\"color:blue\">Private</span> <span style=\"color:blue\">Sub</span> WriteToLog(<span style=\"color:blue\">ByVal</span> strEntry <span style=\"color:blue\">As</span> <span style=\"color:blue\">String</span>)</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        <span style=\"color:blue\">Dim</span> fso <span style=\"color:blue\">As</span> Scripting.FileSystemObject</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        <span style=\"color:blue\">Dim</span> ts <span style=\"color:blue\">As</span> Scripting.TextStream</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        <span style=\"color:blue\">Dim</span> LogFile <span style=\"color:blue\">As</span> Scripting.File</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\"> </span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        fso = <span style=\"color:blue\">New</span> Scripting.FileSystemObject</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\"> </span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        <span style=\"color:blue\">If</span> <span style=\"color:blue\">Not</span> fso.FileExists(<span style=\"color:#a31515\">&quot;C:\\ZipLog.log&quot;</span>) <span style=\"color:blue\">Then</span> _</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">            fso.CreateTextFile(<span style=\"color:#a31515\">&quot;C:\\ZipLog.log&quot;</span>)</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\"> </span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        LogFile = fso.GetFile(<span style=\"color:#a31515\">&quot;C:\\ZipLog.log&quot;</span>)</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        ts = LogFile.OpenAsTextStream(Scripting.IOMode.ForAppending)</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        ts.Write(strEntry &amp; vbCrLf)</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        ts.Close()</span></p>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        ts = <span style=\"color:blue\">Nothing</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        LogFile = <span style=\"color:blue\">Nothing</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">        fso = <span style=\"color:blue\">Nothing</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;font-family:'courier new'\">    <span style=\"color:blue\">End</span> <span style=\"color:blue\">Sub</span>\r\n<p style=\"margin:0cm 0cm 0pt\"><span style=\"font-size:10pt;color:blue;font-family:'courier new'\">End</span><span style=\"font-size:10pt;font-family:'courier new'\"> <span style=\"color:blue\">Class</span>\r\n<p style=\"margin:0cm 0cm 0pt\"> </p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n</span></p>\r\n",
    "PostedDate": "2009-02-28T11:15:49.68-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163195",
    "ThreadId": "48839",
    "Html": "<p>Hey WindChaser, what do you mean by &quot;Service&quot; ?<br>\r\n<br>\r\nIs it a Windows Service - that is administered through   services.msc  ? </p>\r\n<p>ps: You do not need to &quot;Imports Ionic.Zip.ZipFile&quot; as a safety measure.  I have been where you are - trying *anything* to get an app to work - but importing the Ionic.Zip.ZipFile namespace is not going to help you!  There is no such namespace.</p>\r\n",
    "PostedDate": "2009-03-01T08:23:24.817-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163212",
    "ThreadId": "48839",
    "Html": "<p>&nbsp;</p>\r\n<p>I'm using the VB2008 methodology to create a standard service which is user-independent, that is:</p>\r\n<p>- Create a new project in VB2008 of the Windows Service type<br>\r\n- Add logic at module level, no forms or interfaces allowed<br>\r\n- Add a service installer to the project<br>\r\n- Build the project.  By the way, everything compiles properly.<br>\r\n- Install the service using InstallUtil.exe <br>\r\n<br>\r\nThe service runs great and can be viewed, started and stopped for the Windows Control Panel\\Administrative Tools\\Services interface.  The only problem arises when I initiate a ZipFile instance.  The timer event just locks up and doesn't even return an exception.  Meanwhile, the service keeps running but without any further timer events.<br>\r\n<br>\r\nThanks for the code pointer.  I've taken out the &quot;Imports Ionic.Zip.ZipFile&quot;.</p>\r\n",
    "PostedDate": "2009-03-01T09:14:38.457-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163215",
    "ThreadId": "48839",
    "Html": "A puzzle.  <br>\r\n<br>\r\nI just tried this on my machine and everything works just fine.  <br>\r\nThe results you are seeing could be a consequence of some of the other settings you are using in the service, like the Logon account for the service, or the filesystem permissions on the logfile or the directory-to-zip, and so on.  That stuff, I don't see in your code, because I guess it is in a separate module from the one you attached.  I'm attaching my code here. <br>\r\n<br>\r\n<br>\r\n<pre><span style=\"color:#008000\">' VBService.vb</span>\r\n<span style=\"color:#008000\">' </span>\r\n<span style=\"color:#008000\">' for WindChaser.</span>\r\n<span style=\"color:#008000\">' This defines a Windows Service in VB.</span>\r\n<span style=\"color:#008000\">' See article http://www.vbdotnetheaven.com/UploadFile/mahesh/Winservvb11172005233242PM/Winservvb.aspx</span>\r\n<span style=\"color:#008000\">' for the basic idea.</span>\r\n<span style=\"color:#008000\">'</span>\r\n<span style=\"color:#008000\">' compile this with: </span>\r\n<span style=\"color:#008000\">' c:\\.net3.5\\vbc.exe /t:exe /debug+ /R:System.dll /R:Ionic.Zip.dll /out:VBService.exe VBService.vb</span>\r\n<span style=\"color:#008000\">'</span>\r\n<span style=\"color:#008000\">' install as a service with: </span>\r\n<span style=\"color:#008000\">' c:\\.net2.0\\installutil.exe VBService.exe</span>\r\n<span style=\"color:#008000\">'</span>\r\n<span style=\"color:#008000\">'</span>\r\n<span style=\"color:#008000\">' =======================================================</span>\r\n<span style=\"color:#008000\">' Sun, 01 Mar 2009 08:23</span>\r\n<span style=\"color:#008000\">' </span>\r\n\r\n\r\n\r\n<span style=\"color:#0000ff\">Imports</span> System\r\n<span style=\"color:#0000ff\">Imports</span> Ionic.Zip\r\n\r\n\r\n<span style=\"color:#0000ff\">Public</span> <span style=\"color:#0000ff\">Class</span> TestService \r\n    <span style=\"color:#0000ff\">Inherits</span> System.ServiceProcess.ServiceBase\r\n\r\n    <span style=\"color:#008000\">' Prepending the service name with a dash means it shows up first in the </span>\r\n    <span style=\"color:#008000\">' list on the services control panel applet.</span>\r\n    <span style=\"color:#0000ff\">Private</span> <span style=\"color:#0000ff\">Shared</span> MyServiceName <span style=\"color:#0000ff\">as</span> <span style=\"color:#0000ff\">String</span> = <span style=\"color:#800000\">&quot;- Wind Chaser Service&quot;</span>\r\n    <span style=\"color:#0000ff\">Private</span> LogFileName <span style=\"color:#0000ff\">as</span> <span style=\"color:#0000ff\">String</span> = <span style=\"color:#800000\">&quot;C:\\temp\\WindChaser.ZipService.log&quot;</span>\r\n    <span style=\"color:#008000\">'Private FolderToZip as String = &quot;c:\\MyFolder&quot;</span>\r\n    <span style=\"color:#0000ff\">Private</span> FolderToZip <span style=\"color:#0000ff\">as</span> <span style=\"color:#0000ff\">String</span> = <span style=\"color:#800000\">&quot;c:\\dinoch\\dev\\dotnet\\zip\\test\\fodder&quot;</span>\r\n    <span style=\"color:#008000\">'Private OutputZipFile as String = &quot;C:\\MyZippedFolder.zip&quot;</span>\r\n    <span style=\"color:#0000ff\">Private</span> OutputZipFile <span style=\"color:#0000ff\">as</span> <span style=\"color:#0000ff\">String</span> = <span style=\"color:#800000\">&quot;c:\\dinoch\\dev\\dotnet\\zip\\test\\WindChaser.zip&quot;</span>\r\n    \r\n    <span style=\"color:#0000ff\">Private</span> <span style=\"color:#0000ff\">WithEvents</span> Timer1 <span style=\"color:#0000ff\">as</span> System.Timers.Timer \r\n\r\n    <span style=\"color:#0000ff\">Private</span> CycleCount <span style=\"color:#0000ff\">as</span> Int32\r\n\r\n    <span style=\"color:#0000ff\">Public</span> <span style=\"color:#0000ff\">Sub</span> <span style=\"color:#0000ff\">New</span>()\r\n        InitializeSelf()\r\n    <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Sub</span>\r\n\r\n\r\n    <span style=\"color:#0000ff\">Public</span> <span style=\"color:#0000ff\">Shared</span> <span style=\"color:#0000ff\">Function</span> NameOfService <span style=\"color:#0000ff\">as</span> <span style=\"color:#0000ff\">String</span>\r\n        NameOfService = TestService.MyServiceName\r\n    <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Function</span>\r\n\r\n    <span style=\"color:#0000ff\">Private</span> <span style=\"color:#0000ff\">Sub</span> InitializeSelf()\r\n        <span style=\"color:#0000ff\">Me</span>.ServiceName = TestService.MyServiceName\r\n\r\n        <span style=\"color:#008000\">' The timer period is expressed in milliseconds.</span>\r\n        <span style=\"color:#0000ff\">Me</span>.Timer1 = <span style=\"color:#0000ff\">new</span> System.Timers.Timer(<span style=\"color:#800000\">40</span> * <span style=\"color:#800000\">1000</span>) \r\n\t<span style=\"color:#0000ff\">Me</span>.CycleCount = <span style=\"color:#800000\">0</span>\r\n    <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Sub</span>\r\n\r\n\r\n    <span style=\"color:#008000\">' The main entry point for the process</span>\r\n    <span style=\"color:#0000ff\">Shared</span> <span style=\"color:#0000ff\">Sub</span> Main()\r\n\t<span style=\"color:#0000ff\">Dim</span> ServicesToRun <span style=\"color:#0000ff\">As</span> System.ServiceProcess.ServiceBase()\r\n\t<span style=\"color:#008000\">' More than one user Service may run within the same process. To add</span>\r\n\t<span style=\"color:#008000\">' another service to this process, change the following line to</span>\r\n\t<span style=\"color:#008000\">' create a second service object. For example,</span>\r\n\t<span style=\"color:#008000\">' ServicesToRun = New System.ServiceProcess.ServiceBase() {new WinService1(), new MySecondUserService()}</span>\r\n\tServicesToRun = <span style=\"color:#0000ff\">New</span> System.ServiceProcess.ServiceBase() { <span style=\"color:#0000ff\">New</span> TestService() }\r\n\tSystem.ServiceProcess.ServiceBase.Run(ServicesToRun)\r\n    <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Sub</span>\r\n\r\n\r\n\r\n    <span style=\"color:#0000ff\">Protected</span> <span style=\"color:#0000ff\">Overrides</span> <span style=\"color:#0000ff\">Sub</span> OnStart(<span style=\"color:#0000ff\">ByVal</span> args() <span style=\"color:#0000ff\">As</span> <span style=\"color:#0000ff\">String</span>)\r\n        WriteToLog(<span style=\"color:#800000\">&quot;=======================================================&quot;</span>)\r\n        WriteToLog(<span style=\"color:#800000\">&quot;WindChaser's Directory Zip Service is starting....&quot;</span>)\r\n        Timer1.Enabled = <span style=\"color:#800000\">True</span> \r\n    <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Sub</span> \r\n \r\n\r\n    <span style=\"color:#0000ff\">Protected</span> <span style=\"color:#0000ff\">Overrides</span> <span style=\"color:#0000ff\">Sub</span> OnStop()\r\n        Timer1.Enabled = <span style=\"color:#800000\">False</span> \r\n        WriteToLog(<span style=\"color:#800000\">&quot;WindChaser's Directory Zip Service is stopping....&quot;</span>)\r\n        WriteToLog(<span style=\"color:#800000\">&quot;=======================================================&quot;</span>)\r\n    <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Sub</span> \r\n \r\n    <span style=\"color:#0000ff\">Private</span> <span style=\"color:#0000ff\">Sub</span> Timer1_Elapsed(<span style=\"color:#0000ff\">ByVal</span> sender <span style=\"color:#0000ff\">As</span> System.<span style=\"color:#0000ff\">Object</span>, <span style=\"color:#0000ff\">ByVal</span> e <span style=\"color:#0000ff\">As</span> System.Timers.ElapsedEventArgs) <span style=\"color:#0000ff\">Handles</span> Timer1.Elapsed\r\n        WriteToLog(<span style=\"color:#800000\">&quot;Timer1 event triggered&quot;</span>)\r\n        ZipMyFolder()\r\n    <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Sub</span> \r\n \r\n    <span style=\"color:#0000ff\">Private</span> <span style=\"color:#0000ff\">Sub</span> ZipMyFolder()\r\n\t<span style=\"color:#0000ff\">Me</span>.CycleCount = <span style=\"color:#0000ff\">Me</span>.CycleCount + <span style=\"color:#800000\">1</span>\r\n        WriteToLog(<span style=\"color:#0000ff\">String</span>.Format(<span style=\"color:#800000\">&quot;Enter ZipMyFolder(cycle={0})&quot;</span>, <span style=\"color:#0000ff\">Me</span>.CycleCount))\r\n        <span style=\"color:#0000ff\">Try</span> \r\n            Using zip <span style=\"color:#0000ff\">As</span> ZipFile = <span style=\"color:#0000ff\">New</span> ZipFile\r\n                Zip.AddFileFromString(<span style=\"color:#800000\">&quot;ReadMe.txt&quot;</span>, <span style=\"color:#800000\">&quot;&quot;</span>, <span style=\"color:#800000\">&quot;This zip file was created at &quot;</span> &amp; System.DateTime.Now.ToString(<span style=\"color:#800000\">&quot;F&quot;</span>))\r\n                zip.AddDirectory(<span style=\"color:#0000ff\">Me</span>.FolderToZip, <span style=\"color:#800000\">&quot;&quot;</span>)\r\n                WriteToLog(<span style=\"color:#800000\">&quot; Saving...&quot;</span>)\r\n                zip.Save(<span style=\"color:#0000ff\">Me</span>.OutputZipFile)\r\n                WriteToLog(<span style=\"color:#0000ff\">String</span>.Format(<span style=\"color:#800000\">&quot; Wrote {0} files to the zip archive.&quot;</span>, zip.Entries.Count ))\r\n            <span style=\"color:#0000ff\">End</span> Using \r\n        <span style=\"color:#0000ff\">Catch</span> ex1 <span style=\"color:#0000ff\">As</span> Exception\r\n            WriteToLog(<span style=\"color:#800000\">&quot;Zip Exception: &quot;</span> &amp; ex1.ToString())\r\n        <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Try</span> \r\n        WriteToLog(<span style=\"color:#800000\">&quot;Exit ZipMyFolder()&quot;</span>)\r\n    <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Sub</span> \r\n\r\n\r\n \r\n    <span style=\"color:#0000ff\">Private</span> <span style=\"color:#0000ff\">Sub</span> WriteToLog(<span style=\"color:#0000ff\">ByVal</span> strEntry <span style=\"color:#0000ff\">As</span> <span style=\"color:#0000ff\">String</span>)\r\n        <span style=\"color:#008000\">' use AppendText to write to the log file. </span>\r\n        <span style=\"color:#008000\">' See http://msdn.microsoft.com/en-us/library/3zc0w663.aspx </span>\r\n        <span style=\"color:#008000\">' for a discussion.</span>\r\n\r\n        <span style=\"color:#008000\">' The System.IO.File.AppendText() method creates the file if it </span>\r\n        <span style=\"color:#008000\">' does not exist. </span>\r\n        <span style=\"color:#008000\">' See http://msdn.microsoft.com/en-us/library/system.io.file.appendtext.aspx</span>\r\n\r\n        Using w <span style=\"color:#0000ff\">As</span> System.IO.StreamWriter = System.IO.File.AppendText(<span style=\"color:#0000ff\">Me</span>.LogFileName)\r\n            w.WriteLine(<span style=\"color:#800000\">&quot;{1} {0} : {2}&quot;</span>, DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString(), strEntry)\r\n        <span style=\"color:#0000ff\">End</span> Using \r\n    <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Sub</span> \r\n\r\n<span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Class</span> \r\n\r\n \r\n\r\n\r\n\r\n\r\n&lt;System.ComponentModel.RunInstallerAttribute(<span style=\"color:#800000\">True</span>)&gt; _\r\n<span style=\"color:#0000ff\">Public</span> <span style=\"color:#0000ff\">Class</span> MyProjectInstaller\r\n    <span style=\"color:#0000ff\">Inherits</span> System.Configuration.Install.Installer\r\n\r\n    <span style=\"color:#0000ff\">Private</span> serviceInstaller <span style=\"color:#0000ff\">As</span> System.ServiceProcess.ServiceInstaller\r\n    <span style=\"color:#0000ff\">Private</span> processInstaller <span style=\"color:#0000ff\">As</span> System.ServiceProcess.ServiceProcessInstaller    \r\n    \r\n    <span style=\"color:#0000ff\">Public</span> <span style=\"color:#0000ff\">Sub</span> <span style=\"color:#0000ff\">New</span>()\r\n        <span style=\"color:#008000\">' Instantiate installers for process and services.</span>\r\n        processInstaller = <span style=\"color:#0000ff\">New</span> System.ServiceProcess.ServiceProcessInstaller()\r\n        serviceInstaller = <span style=\"color:#0000ff\">New</span> System.ServiceProcess.ServiceInstaller()\r\n        \r\n        <span style=\"color:#008000\">' The services will run under the system account.</span>\r\n        processInstaller.Account = System.ServiceProcess.ServiceAccount.LocalSystem\r\n        \r\n        <span style=\"color:#008000\">' The services will be started manually.</span>\r\n        serviceInstaller.StartType = System.ServiceProcess.ServiceStartMode.Manual\r\n        serviceInstaller.Description = <span style=\"color:#800000\">&quot;A service that periodically zips up a directory.&quot;</span>\r\n        \r\n        <span style=\"color:#008000\">' ServiceName must equal those on ServiceBase derived classes. </span>\r\n        serviceInstaller.ServiceName = TestService.NameOfService\r\n        \r\n        <span style=\"color:#008000\">' Add installers to collection. Order is not important.</span>\r\n        Installers.Add(serviceInstaller)\r\n        Installers.Add(processInstaller)\r\n    <span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Sub</span>\r\n<span style=\"color:#0000ff\">End</span> <span style=\"color:#0000ff\">Class</span>\r\n\r\n</pre>\r\n",
    "PostedDate": "2009-03-01T09:41:10.533-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163256",
    "ThreadId": "48839",
    "Html": "It still doesn't work.  But the behavior has changed in that the Timer1 event does not lock up.  However, given that you've committed everything to code, it makes it much easier to figure out why all this is occuring.<br>\r\n<br>\r\nThese are the exact steps that I've taken, without excluding any detail.  If it's not there, that means that I didn't do it and therefore may have forgotten it.<br>\r\n- Created a new project in VB2008 under .NET Framework 3.5.  Selected Windows Service as the template.  Renamed project to TestService.<br>\r\n- In the project properties, <br>\r\n    - I set the startup object as Sub Main.  <br>\r\n    - In the references, I added System.Configuration.Install from the .Net tab, and browsed over to where I saved the Ionic libraries to include Ionic.Zip.dll.<br>\r\n- In the Solution Explorer, I changed Service1.vb to TestService.vb .<br>\r\n- In the TestService.vb code pane, I overwrote the existing TestService class with your TestService class.  This yields 2 errors regarding multiple definitions of Sub Main and 1 warning that Sub New should call the InitializeComponent method.<br>\r\n- In the TestService.Designer.vb pane:<br>\r\n     - I removed the Shared Sub Main of the template.<br>\r\n     - I added your Public Class MyProjectInstaller.<br>\r\n     - For good measure, I changed Me.ServiceName = &quot;Service1&quot; to Me.ServiceName = &quot;TestService&quot; in the InitializeComponent sub even though we don't actually refer to it.<br>\r\n<br>\r\n- Changed the FolderToZip to &quot;C:\\Temp\\Folder&quot; and the OutputZipFile to &quot;C:\\Temp\\WindChaser.zip&quot;<br>\r\n- Built TestService.exe, no problem.<br>\r\n- Used InstallUtil.exe from the .Net 2.0 folder to install the service.  The transacted install is completed.<br>\r\n- I start the - Wind Chaser Service and wait a few minutes, then stop the service.  This is the content of the log:<br>\r\n<br>\r\n1 mars 2009 16:07:55 : =======================================================<br>\r\n1 mars 2009 16:07:55 : WindChaser's Directory Zip Service is starting....<br>\r\n1 mars 2009 16:08:35 : Timer1 event triggered<br>\r\n1 mars 2009 16:09:15 : Timer1 event triggered<br>\r\n1 mars 2009 16:09:55 : Timer1 event triggered<br>\r\n1 mars 2009 16:10:35 : Timer1 event triggered<br>\r\n1 mars 2009 16:11:00 : WindChaser's Directory Zip Service is stopping....<br>\r\n1 mars 2009 16:11:00 : =======================================================<br>\r\n<br>\r\n<br>\r\nNote that I am using a fresh install of Visual Studio 2008 Pro and that I am using .Net 3.5, not the .Net 3.5 Service Pack.  The machine is Intel-based on WinXP Pro SP2.<br>\r\n<br>\r\nThanks for your help!<br>\r\n<br>\r\n<br>\r\n<br>\r\n<br>\r\n<br>\r\n<br>\r\n<br>\r\n",
    "PostedDate": "2009-03-01T13:19:46.07-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163278",
    "ThreadId": "48839",
    "Html": "WC, I will check this out a little later, to see if I can follow your steps myself. <br>\r\nI didn't actually use Visual Studio to write the code I gave to you.  I just wrote it in a text editor, starting from what you gave me. <br>\r\nI'll try in Visual Studio later, and let you know how I fare.\r\n",
    "PostedDate": "2009-03-01T15:31:53.797-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163499",
    "ThreadId": "48839",
    "Html": "<p>OK, I investigated a little more. </p>\r\n<p>I followed your steps - tried to do it exactly as you described. </p>\r\n<p>I got a working .exe.  The installutil succeeded.  When I started the service , everything worked as expected. </p>\r\n<pre>Monday, March 02, 2009 7:33:45 AM : =======================================================\r\nMonday, March 02, 2009 7:33:45 AM : WindChaser's Directory Zip Service is starting....\r\nMonday, March 02, 2009 7:34:25 AM : Timer1 event triggered\r\nMonday, March 02, 2009 7:34:25 AM : Enter ZipMyFolder(cycle=1)\r\nMonday, March 02, 2009 7:34:25 AM :  Saving...\r\nMonday, March 02, 2009 7:34:26 AM :  Wrote 108 files to the zip archive c:\\dinoch\\dev\\dotnet\\zip\\test\\WindChaser.zip.\r\nMonday, March 02, 2009 7:34:26 AM : Exit ZipMyFolder()\r\nMonday, March 02, 2009 7:35:05 AM : Timer1 event triggered\r\nMonday, March 02, 2009 7:35:05 AM : Enter ZipMyFolder(cycle=2)\r\nMonday, March 02, 2009 7:35:05 AM :  Saving...\r\nMonday, March 02, 2009 7:35:06 AM :  Wrote 108 files to the zip archive c:\\dinoch\\dev\\dotnet\\zip\\test\\WindChaser.zip.\r\nMonday, March 02, 2009 7:35:06 AM : Exit ZipMyFolder()\r\n</pre>\r\n<p>I tried this on Vista (my own development machine), and on WinXP SP2, and got the same results in both cases. It just works.</p>\r\n<p>I can make some additional suggestions to you. </p>\r\n<ol>\r\n    <li>Double-check that all directories exist, and that the LocalService has permissions on them.</li>\r\n    <li>If you are savvy with Visual Studio, you may be able to attach to your TestService.exe and debug it, as it runs. This may give you some insight into why the thing is not behaving the way you expect.</li>\r\n    <li>If you cannot do that, try this:  To determine if the problem is related to the DotNetZip library, temporarily remove all the Code between the Try...End Try in the ZipMyFolder() method. This reduces the method to a couple calls to WriteToLog(). See if log messages are generated when you run the resulting service. In the code I provided, if the calls into the DotNetZip library succeed, you should see a log message indicating that. If the code fails, in other words if there is an exception in the DotNetZip code, you should see a log message to that effect. One way or the other you should see a log message.  We saw nothing in the log from the ZipMyFolder() method. Nothing at all. Strange. </li>\r\n</ol>\r\n",
    "PostedDate": "2009-03-02T08:07:18.283-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163547",
    "ThreadId": "48839",
    "Html": "<p>In the timer event, I delete and recreate the folder, then copy the log file into into it to prove that the service has access to the folder and file.  As you suggested, I took<br>\r\nout all lines of code pertaining to the library.  Everything works fine and the log shows all activity.  I then put just<br>\r\n<br>\r\n<span style=\"font-size:13px\"><span style=\"font-size:13px;color:#0000ff\">Using</span> zip </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> ZipFile = </span><span style=\"font-size:13px;color:#0000ff\">New</span><span style=\"font-size:13px\"> ZipFile<br>\r\n      <span style=\"font-size:13px\">WriteToLog(</span><span style=\"font-size:13px;color:#a31515\">&quot;ZipFile instantiated.&quot;</span><span style=\"font-size:13px\">)<br>\r\n<span style=\"font-size:13px;color:#0000ff\">End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Using</span></span></span><br>\r\n<br>\r\nand then all I get in the log is &quot;Timer1 event triggered&quot;.<br>\r\n<br>\r\nI've copied the entire project onto <a href=\"http://ExcelDent.ca/TestService.zip\">HTTP://ExcelDent.ca/TestService.zip</a> so that you may download it.  <br>\r\nIf it works on your machine, then the issue is outside the project.<br>\r\n<br>\r\n<br>\r\n<br>\r\n<br>\r\n<br>\r\n<span style=\"font-size:13px;color:#0000ff\"><br>\r\n<br>\r\n<br>\r\n<br>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\"><br>\r\n \r\n<p>&nbsp;</p>\r\n</span></p>\r\n",
    "PostedDate": "2009-03-02T10:56:18.167-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163641",
    "ThreadId": "48839",
    "Html": "WC, I downloaded your code, ran it here - everything worked fine. <br>\r\nNot sure what is going on, something mysterious, that's for sure. <br>\r\nIt's really odd that you don't see exceptions either.   What if you induced an artificial exception in the ZipMyFolder() method?  For example, just introduce a &quot;Throw New System.Exception(&quot;Woot!&quot;) into that method. <br>\r\nIf you surround that Throw statement with a Try...Catch...End Try.... And then in the Catch clause, you write to the log file... do you see log writes?  <br>\r\n<br>\r\nI'm thinking that maybe there is an exception being generated by the Zip library somehow, but the mystery to me is why you do not see the exception, why you cannot catch it.  <br>\r\n",
    "PostedDate": "2009-03-02T15:57:52.327-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163665",
    "ThreadId": "48839",
    "Html": "I've tried it all.  The problem occurs at instantiation, so I can't catch it like that.  But the issue is obviously at machine-level.  I would have to try it out on another machine, which I don't have available at the moment.  As soon as I figure something out, I'll let the forum know for everyone's benefit.  Thanks!\r\n",
    "PostedDate": "2009-03-02T18:04:46-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163697",
    "ThreadId": "48839",
    "Html": "What a puzzle.<br>\r\nDoes an app using DotNetZip work as a regular standalone application?  (outside the Service)<br>\r\n<br>\r\nHave you tried GAC'ing the library?  (Gacutil -i Ionic.Zip.dll)  I think you need to be administrator to GAC the library. <br>\r\n",
    "PostedDate": "2009-03-02T21:30:58.323-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "163725",
    "ThreadId": "48839",
    "Html": "@WindChaser,<div>You can try to add the following statement to break into the debugger while your service is running.</div><div><br></div><div>System.Diagnostics.Debugger.Break();<br></div><div><br></div><div><br></div>",
    "PostedDate": "2009-03-03T00:26:37.557-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]