PC Review


Reply
Thread Tools Rate Thread

Problem Accessing Network Drives (Network Authentication)

 
 
martin lanny
Guest
Posts: n/a
 
      29th Nov 2007
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

 
Reply With Quote
 
 
 
 
martin lanny
Guest
Posts: n/a
 
      29th Nov 2007
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Problem Accessing Network Drives (Network Authentication) Trevor Benedict Microsoft C# .NET 0 30th Nov 2007 02:06 AM
Re: Problem Accessing Network Drives (Network Authentication) Trevor Benedict Microsoft VB .NET 0 30th Nov 2007 02:06 AM
Problem Accessing Network Drives (Network Authentication) martin lanny Microsoft VB .NET 1 29th Nov 2007 09:13 PM
Problem accessing shared network drives on a home network =?Utf-8?B?UmF2?= Windows XP Networking 1 2nd Feb 2005 05:47 PM
disconnected network drives - network drives.gif (0/1) rube@goldberg.com Windows XP Basics 0 29th Jan 2005 04:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:30 PM.