title: Find directory on different server
body: <p>I have a website on Server A and it needs to find a directory on Server B.</p>
  
  <p>On my aspx page, I have:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;mb:FileSystemDataSource
      ID="fileSystemDataSource" runat="server"
      RootPath="\\servername\Folder\Subfolder"
      FoldersOnly="true" /&gt;
  </code></pre>
  
  <p>mb is assembly name alias.</p>
  
  <p>On my aspx.cs page, I have: </p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      DataTable gridviewSource = DisplayFilesInGridView();
      DataRow gridviewRow;
  
      //sets the server path so it does not default to current server
      string ServerPath = System.IO.Path.Combine(
          "//",
          this.fileSystemDataSource.RootPath);
  
      //Get All Folders Or Directories and add in table
      DirectoryInfo directory = new DirectoryInfo(Server.MapPath(ServerPath));
      DirectoryInfo[] subDirectories = directory.GetDirectories();
  }
  </code></pre>
  
  <p>Well, it throws an error on the Server.MapPath because it cannot find the server.
  I am connected to the network. 
  I looked at IIS, and I am pretty sure that is not the problem. If so, I would really need specifics. 
  Any help would be appreciated.</p>