1

I have an application that usually tried to access files that placed on its own machine. The way it access the file is UNC form, for example:

\\MyComputerName\MySharedFolder\file.txt

It's all work fine until i disconnect the computer from the network - the shared folder becomes unreachable although it placed locally.

Things i tried: 1. Login with network account and set permissions to everyone for the folder 2. Login with local admin account, and set permission to this user for the folder

that didn't work out...

Oh, this is about windows XP...

Thanks!

Satumba
  • 143
  • 1
  • 5

4 Answers4

1

It's not a permission problem. You're trying to access the machine through the network stack. When you disconnect from the network, the UNC path (even though it's on the same computer) is not accessible. Why not use a local drive path instead of a UNC path?

joeqwerty
  • 109,901
  • 6
  • 81
  • 172
  • Thanks! Lets say i can't access to the path in a different way, only UNC with computer name. is there a way to bypass the problem? What weird is that when i ping my computer's name after network disconnected i do get 127.0.0.1 ... – Satumba Dec 23 '09 at 14:58
1

Add MyComputerName to your hosts file pointing to 127.0.0.1

%systemroot%\system32\drivers\etc\HOSTS

sclarson
  • 3,684
  • 22
  • 20
1

When you disconnect your computer from the network you practically loose the network adapter. In order to be able to use the network again you need to install a loopback adapter (Microsoft offers one for free).

There is also a way to configure your network connection to switch from your standard network adapter to the loopback adapter when you pull out the network cable. Unfortunatly, I don't have the information at hand but it shouldn't be to difficult to google the solution.

Peter Schuetze
  • 1,241
  • 10
  • 17
0

Check the share permissions and the NTFS permissions on the folder(s) themselves.

Mitch
  • 1,147
  • 11
  • 20
  • That didn't work out, i set full permission for this folder and still it is unaccessible. maybe i miss something... can you be more specific? – Satumba Dec 23 '09 at 13:58
  • It sounds like you have different permissions set between the share and the folder. So, on the properties of the shared folder you would check the "Sharing" tab and the permissions there to confirm the account you're using has the necessary share access then check the "Security" tab to see if the account you're using has the necessary NTFS access. – Mitch Dec 23 '09 at 14:32
  • Thanks, i double checked it, the permissions looks fine. This is what I've done: (1) Create a new folder on my desktop (2) Folder properties -> Sharing tab -> share the folder + Permission button -> add permission full control to my local user and my network user (and Everyone) (3) Security tab -> add full control to my local and network user. (4) Successfully access with UNC (5) Disconnect the network cable (5) try again to access the folder with UNC and failed – Satumba Dec 23 '09 at 14:45