Hello- I am trying to use the GetDirectories() method in an ASP.NET application to get a list of subdirectories on a seperate computer on the company intranet using the DirectoryInfo class. When I try this I get the error "unknown user name or bad password". I can navigate to the folder and change the files in explorer. I can also use GetDirectories() method if I create a console application. This leads me to believe that the
<identity impersonate="true"/> tag that i added to the web.config file isn't doing its jobn since I know the ASP.NET user doesn't have the right persmissions to do this. The website refuses to start up when I change the tag to impersonate my credentials. <identity impersonate="true" username="userName" password="password"/ > and gives the error "Could not create Windows user token from the credentials specified in the config file. Error from the operating system 'Logon failure: unknown user name or bad password." -,|,,_(o_o) _,,|,- The article from MS support (see below) says I need to give the ASP.NET user the ability to "act as part of the operating system" in the Local security policy, which I did. Still refuses to start up. http://support.microsoft.com/kb/306158 Here is the code where it gives the "unknown user name or bad password" error... DirectoryInfo di = new DirectoryInfo(@"\\fakename\fakename \ChartData"); DirectoryInfo[] dis1 = di.GetDirectories(); Thanks for Anything, Rex
