Hello,

I created an application, that scans remote IIS servers/websites and get their location of log files. I need to check the amount of the log files. Obviously the log files are located in default location (customer decision :D ). Problem is that those locations are not as shared folders, so I need to access them via IPC (administrative shares).
Logs are mostly located here (depends on ID of website):
"\\servername\c$\windows\system32\logfiles\w3c... " .

The location is correct as I can add the folder path to explorer and open the location from any server.
It is an Active Domain environment and my account is on each server in Administration group. I run the application under my own account. On server where I am logged, it works without any problems (locally).

I tried impersonating it, but as it looks like, the ActiveDomain politics probably disabled my account. So I cannot do proper testing on what works or not.

...
DirectoryInfo theFolder = new DirectoryInfo(path);
foreach (FileInfo thefile in theFolder.GetFiles())
{
  average_sizeKB+=thefile.Length;
}

I need only simple file listening.
Do you have an idea how is the best way to overcome this problem?

Do you have an idea how is the best way to overcome this problem?

Not at this moment :)

I have a little doubt about Active Directory's part in your problem. Have you tried changing log files ACL?

Not at this moment :)

I have a little doubt about Active Directory's part in your problem. Have you tried changing log files ACL?

I would like to do it, but on next checks they (admins) will renew it due to security standards. Therefore modify of existing setup is not an option for me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.