title: Unable to access sqlite database on server
body: <p>I'm trying to copy sqlite db file and access it over the network. </p>
  
  <p>Issue is on server while trying to access the copy of sqlite db even though when i run application on localhost, it works absolutely fine.</p>
  
  <pre><code>public bool CopyDB()
      {
          string fileName = "spiceworks_prod.db";
          string sourcePath = "\\\\vapp01\\Spiceworks\\db";
          string targetPath = "\\\\vapp01\\Spiceworks\\db\\backup\\temp";
  
  
  
          // Use Path class to manipulate file and directory paths.
          string sourceFile = System.IO.Path.Combine(sourcePath, fileName);
          string destFile = System.IO.Path.Combine(targetPath, fileName);
  
          // To copy a folder's contents to a new location:
          // Create a new target folder, if necessary.
          if (!System.IO.Directory.Exists(targetPath))
          {
              System.IO.Directory.CreateDirectory(targetPath);
          }
  
          // To copy a file to another location and 
          // overwrite the destination file if it already exists.
          if (!System.IO.Directory.Exists(destFile))
          {
              File.SetAttributes(destFile, FileAttributes.Normal);
              System.IO.File.Copy(sourceFile, destFile, true);
  
              return true;
          }
          else
          {
              return false;
          }
  </code></pre>
  
  <p>Unable to open databasefile</p>
  
  <p><a href="https://i.stack.imgur.com/81V58.png" rel="nofollow noreferrer">Here is a picture of the error description</a></p>