473,473 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem Accessing Network Drives (Network Authentication)

My application should periodically connect to multiple network drives to
see if the certain files were created.

I would do this to retrieve the list of files in UNC path //server1/backup/:

----------------------------------
Folder = "//server1/backup/"
Dim listoffiles As New List(Of System.IO.FileInfo)
listoffiles.AddRange(New System.IO.DirectoryInfo(Folder).GetFiles())
----------------------------------

This doesn't work though, because network drive expects network
credentials to be passed.

If I opened the same path (//server1/backup/) in windows explorer, it
would ask me for name and password, but the code above doesn't do any of
that, it just tells me that the drive doesn't exist.

Is there any way to pass network credentials programmatically?

I spent 3 days searching all over the Internet trying to find an answer,
but it seems dot net simply doesn't have any other option than mapping
the drive. I tried 3-4 of those mapping solutions, but neither worked
reliably.

All I want is to access network path (unc) using network credentials, if
there is no way to do so in dot net it would really be a sad discovery.

Joe

Nov 29 '07 #1
1 2158
I am planning on writing a blog entry about limitations of .net 2003/2005.
Microsoft support, can you please confirm, that this is not possible?
Nov 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Yazeed | last post by:
I developed a web application using asp.net which send an email using "SmtpMail" and it was working perfectly . when i upload it to the webhosint i bought , it didn't work because of email...
1
by: Lamberti Fabrizio | last post by:
I've an authentication problem with IServerXMLHTTPRequest. I've got two web server named WS_1 and WS_2 part of the same NT domain. On WS_1 I've published on the virtual directory virt1 the asp...
36
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC...
4
by: marc.gibian | last post by:
I am writing a small Windows Service in C#. It is structured as two C# programs, one, let's call it myAction, that runs as a command line program and a second, let's call it myWrapper, that is the...
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
4
by: mattsthompson | last post by:
Im writing a DLL that extends IHttpHandler to intercept requests for a certain file extension and deliver watermarked images. I'm using LeadTools' .NET framework for the image manipulation and it...
1
by: martin lanny | last post by:
My application should periodically connect to multiple network drives to see if the certain files were created. I would do this to retrieve the list of files in UNC path //server1/backup/: ...
19
by: cj | last post by:
I'm getting terrible response times trying to pull data from VFP tables using .net--like 2 minutes! Can someone help? f:\arcust01 currently contains 187,728 records and is indexed on CUSTNO...
4
by: Jon | last post by:
I wrote a VS 2005 C# express programme that accesses a web service. It works fine when there's a direct connection to the internet, but on two different PCs with internet access via a proxy, I get...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.