Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

4 Answers 4

up vote 1 down vote accepted

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?

share|improve this answer
    
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

Add MyComputerName to your hosts file pointing to 127.0.0.1

%systemroot%\system32\drivers\etc\HOSTS

share|improve this answer
    
Better still, use localhost instead of the computer name. –  John Gardeniers Dec 23 '09 at 20:43

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.

share|improve this answer
    
Thanks! the loopback adapter is a good solution. –  Satumba Dec 24 '09 at 7:10

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

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.