displaying directory structure

  • Thread starter Thread starter CSharper
  • Start date Start date
C

CSharper

Hi,

I need to display the directory structure of a directory in a network.
When I use the network share I do not have any problem with my
Directory.GetFiles() but when I use \\servername\c$, I am getting
security exceptions. I can understand why that error is coming. Is it
possible to popup for credentials when a user does this kind of
operations and how can I pass the credentials to the
Directory.GetFiles().

On the side note, when I use the \\servername\c$ on the windows
explorer I do not get any credentials requirement. How can I overcome
this?

Thanks.
 
\\servername\C$ is the Administrative share. When you do this from Windows
Explorer, it works because you must be an Administrator. It doesn't work for
your application, most likely, because it isn't running under an account
identity that is an Administrator.

--Peter
 
\\servername\C$ is the Administrative share. When you do this from Windows
Explorer, it works because you must be an Administrator. It doesn't work for
your application, most likely, because it isn't running under an account
identity that is an Administrator.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top