Failure to connect to admin share pops up dialog
Posted
by
Jan
on Server Fault
See other posts from Server Fault
or by Jan
Published on 2012-06-05T10:17:17Z
Indexed on
2012/06/05
10:41 UTC
Read the original article
Hit count: 264
I'm having an issue with a curious error message when accessing the administrative share on a remote machine. Specifically, the client is logged in as the domain administrator on the machine A, and runs some code that tries to access the admin share on B (a domain member).
The access is done in .NET, along these lines (though I am not sure if the method of access makes a difference):
string path = @"\\B\admin$";
if (Directory.Exists(path))
{
try
{
path += @"\temp\";
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
path += "myfile_remote";
File.Copy("myfile", path);
Now, on some machines this fails. That is not a big problem as we have a fallback. I'd like to know why but it is not the real issue.
The problem is that running this piece of code causes a dialog box to pop up for the logged-in user on B, saying "network error trying to access \\B\admin$\temp\myfile_remote. Contact the network administrator and ask for the correct permissions". Unfortunately, it is a foreign language Windows so I'll spare you all posting a screenshot. It is skinned like a standard Windows dialog box.
Why exactly is that dialog box popping up for the user and is there anything I can do about it?
Edit to add: B is a Windows 7 Enterprise installation. The client is not aware of any GPO policies being installed. There is AV from Trend Micro installed.
© Server Fault or respective owner