title: I am getting an error "The device is not ready" while accessing files from file directory
body: <p>I want to get total slide count of all ppt files in a folder. The code that i used is working on my local machine, but it is giving an error"The device is not ready" when running on server/live website.</p>
  
  <p>Following is the code i've used:</p>
  
  <pre><code> public void getslidecount()
      {
          int slidesCount = 0;
          int totalslidesCount = 0;
  
  
  
          foreach (var file in Directory.GetFiles(txtpath.Text))
          {
              string ext = file.ToString();
              ext = Path.GetExtension(ext);
  
              if (ext == ".ppt" || ext == ".pptx")
              {
                  Presentation ppt = new Presentation();
  
                  ppt.LoadFromFile(file);
                  slidesCount = Convert.ToInt32(ppt.Slides.Count);
  
                  totalslidesCount += slidesCount;
              }
          }
  
  
          txtcount.Text = totalslidesCount.ToString();
          lblcount.Visible = true;
      }
  
      protected void btngo_click(object sender, EventArgs e)
      {
          getslidecount();
      }
  </code></pre>
  
  <p>Error is on line " foreach (var file in Directory.GetFiles(txtpath.Text))"</p>
  
  <p>Also note, i've imported dll of Spire for Presentation "using Spire.Presentation;</p>
  
  <p>Thanks for help in advance!</p>