473,395 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1682
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

9
by: Pacific Design Studios | last post by:
I'm running ASP on IIS 5. My users who are on the network can access our database. Any users from the internet "outside" the network can't access it. We don't have a firewall. Our Windows Server...
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.