Solved

I can access local logical drives, but not networked drives using Directory.GetLogicalDrives().

Posted on 2004-08-18
12
361 Views
Last Modified: 2010-04-15
Hello everyone!

I am creating a web-based application and would like to be able to find and display any mapped networked drives available, in addition to the local drives. Is this possible?

Thank you!

Sincerely,
Taarik.
0
Comment
Question by:TZRick
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 
LVL 20

Expert Comment

by:TheAvenger
ID: 11830601
I am making a test here and I get all drives, including mapped ones, both using Directory.GetLogicalDrives() and Environment.GetLogicalDrives(). Could it be that the server where your web application is running has no mapped drives? You know that this will take the drives ON THE SERVER when it's a web application, don't you?
0
 
LVL 1

Author Comment

by:TZRick
ID: 11830627
Right... I forgot to mention that. I am trying to get access to the local drives and mapped drives of the client machine and not those on the server. Any suggestions?

Thank you!

Sincerely,
Taarik.
0
 
LVL 20

Accepted Solution

by:
TheAvenger earned 50 total points
ID: 11830684
No way with the C# at the server side. It is executed on the server and knows nothing about the client. You should use client scripting for this. However I don't think you can make this with JavaScript. Maybe with VB, but the standard security will not allow this. So you need to make a script or ActiveX, then sign it, then ask the user for allowance to execute the code (ok, the browser will ask for that if you sign the ActiveX with a VeriSign certificate which costs some thousand bucks per year...)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:TZRick
ID: 11830743
Thanks! ...Not very encouraging if I might add! :-)
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 11830763
Sorry :-(( Drives are too sensitive information for the client, that's why you cannot touch them without the explicit permission of the user and you have to identify yourself even for that (that's why you need signatures)
0
 
LVL 1

Author Comment

by:TZRick
ID: 11830937
So (besides learning script or ActiveX...I just started C#!), the solution would be to make a Windows program that would handle the job?
0
 
LVL 1

Author Comment

by:TZRick
ID: 11830942
...and have the intended users download the application?
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 11830964
Could be... Depends on your requirements. It is possible to even "teach" your program to check for new versions and to download it and install it if available....
0
 
LVL 1

Author Comment

by:TZRick
ID: 11831011
Great! I was just hoping I could build off the interface I already created, so at least my work was not in vain.

Thank you so much for your help! :-)

By the way... Congrats on topping the C# stats! ;-)
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 11831055
I lost this year's first place and I suppose I will soon lose also the overall one... But I don't have much time to check answers here, while gregory is answering very fast the recent month....
0
 
LVL 1

Author Comment

by:TZRick
ID: 11831077
Well, second place out of thousands of contributors ain't bad in my books, but if you're such a perfectionist... ;-)
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 11831093
:-))
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question