Logon Failure?
-
Dim Directories As String() = System.IO.Directory.GetDirectories("\\vol1\test\")
The error that I get is Logon Failure: unknown user name or bad password. How do I implement my username and password into the statement above to access the network drive? Thanks in advance.:)
-
Dim Directories As String() = System.IO.Directory.GetDirectories("\\vol1\test\")
The error that I get is Logon Failure: unknown user name or bad password. How do I implement my username and password into the statement above to access the network drive? Thanks in advance.:)
Hi Britnt7, Sorry I couldn't get back to you sooner. The problem is that your ASP.NET application is running in a process under the local machines IUSR_ account. This has limited access at best - but out on a corporate network is about as useful as the proverbial chocolate teapot. In *most* network setups I've encountered you can get access by just putting the following in your applications web.config
<system.web>
<identity impersonate="true"/>
...
...
...
</system.web>This is fine in most intranets, but public-facing networks will be bolted down more-so and you will have to create a DOMAIN user account or group that the process will need to use. As this is an extremely verbose process to describe here and now, here is a link that will help you along... MSDN - Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication Hope this helps, Andy
-
Hi Britnt7, Sorry I couldn't get back to you sooner. The problem is that your ASP.NET application is running in a process under the local machines IUSR_ account. This has limited access at best - but out on a corporate network is about as useful as the proverbial chocolate teapot. In *most* network setups I've encountered you can get access by just putting the following in your applications web.config
<system.web>
<identity impersonate="true"/>
...
...
...
</system.web>This is fine in most intranets, but public-facing networks will be bolted down more-so and you will have to create a DOMAIN user account or group that the process will need to use. As this is an extremely verbose process to describe here and now, here is a link that will help you along... MSDN - Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication Hope this helps, Andy
-
Is that all I have to add the the Web.config file?
identity impersonate="true"
...
...
...or is there something that I am suppose to substitute for the ...? Thanks again:)
Just add the identity tag into your web.config file. the "..." is just to symbolise the rest of the contents of the web.config file. Now if your network isn't too heavily bolted down, you should be able to connect to the network resource. Of course if read access to the shared directory is guarded (i.e. "Everyone" doesn't have access) then you will need to do more configuring.