Need suggestion for accessing remote machine in asp.net
<p>I want to access some places on a remote machine.The folder i want to access have full control to EVERYONE.  The code given below is used to access  network path.</p>

<pre><code> System.IO.DirectoryInfo locationInfo = new System.IO.DirectoryInfo(BackupLocationTxt.Text);
        if (locationInfo.Exists)  
        {
            // do some operations
         }
</code></pre>

<p>The application run fine if both the host computer and the remote computer to be accessed  having os windows xp .The application also run fine if the application is running inside visual studio  .</p>

<p>Then my problems is ,any one of the machine( server and remote machine)having an os newer  then windows xp( like windows 7, server 2008) locationInfo.Exists always false.</p>

<p>But if the application is running inside in visual studio, then it work fine independent of os</p>

<p>I searched a lot in net. But didnt find an exact solution yet. Someone suggests impersonation. But i dont know exactly how to do it. Is impersonations is the solution for my problem ?? Or is there any better ideas??</p>

<p>Any help will be greatly appreciated</p>
