473,320 Members | 2,071 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,320 software developers and data experts.

Map a drive

I want to map a drive to my web server at run time when a user clicks a link in my web application

Is there a namespace in VB.net to Map drives

Or
is there a Shell command which directly runs the command from the command prompt instead of running a EXE or a batch file

Does anybody have a method or code for this in VB.net

Please let me know

SKumar
Nov 18 '05 #1
3 1809
map from the client? or from the server to another machine? If the first,
NO, if the second, why map? Just use UNC, but yes you can map them.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"skumar" <an*******@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
I want to map a drive to my web server at run time when a user clicks a link in my web application.
Is there a namespace in VB.net to Map drives?

Or
is there a Shell command which directly runs the command from the command prompt instead of running a EXE or a batch file?
Does anybody have a method or code for this in VB.net.

Please let me know.

SKumar

Nov 18 '05 #2
May i please have a sample code of how to do this.

Using a namespace in .net??

or using shell command??

Can you let me know the code for this mapping. Also this is a web scenario. what permissions should we grant to ASP.net user for doing this??
Nov 18 '05 #3

"skumar" <an*******@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com...
May i please have a sample code of how to do this.

Using a namespace in .net??

or using shell command??

Can you let me know the code for this mapping. Also this is a web

scenario. what permissions should we grant to ASP.net user for doing this??

Mapping seems like a bad idea. Note that drives are mapped per users, so
they will be mapped as whoever your webapp is running as. Unless you are
doing impersonation, this is going to be the same user every time. You will
get an error if you try and map a drive already mapped. Of course your code
can check for this, but I can imagine a lot of concurrency problems. What
if one user has just mapped the drive, and the code checks and sees if it is
already mapped, but then the first users is finished and the drive is
unmapped, you will have problems. There are other problems too. If you are
using impersonation, what if that user is already using that drive letter?
Why not use the UNC as Curt suggested?

-John Oakes
Nov 18 '05 #4

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

Similar topics

7
by: GregT | last post by:
I program in C#. Is there a way to determine which of the local machine's logical drives are associated with CD drive(s)?
2
by: giloosh99 | last post by:
Hello, Im grabbing tables via VB code using visual foxpro ODBC drives. The tables directory is in a mapped network drive. The code works fine and does the job, however if the computer is idle for...
1
by: Max Baki via .NET 247 | last post by:
I all, i've write a sample ftp Windows service which download files and copy them on remote share or remote mapped drive (the service works fine on local drives). This part of code is the...
7
by: jimdscudder | last post by:
How can I use WMI or a WqlObjectQuery to find the hard drive letter of the physical drive location index. For example the following code will give me the physical drive location:...
5
by: Nirosh | last post by:
Hi All, Can any one suggest me a best way to do this .. I have a thrid party tool "EXE" that we need to use with our web service to manipulate some complex XML files, which reside in a...
3
by: James N | last post by:
My ASP.NET application needs read/write permissions for drive "Z:", which is mapped to my Linksys Gigadrive (Network Attached Storage...if anyone is familiar with that). If I configure the...
2
by: Kavitha | last post by:
Hi , Can any one tel me how to create a virtual drive in C#( similar to Gmail Virtual drive).Also tell me what interfaces could be used to create the same. Thanks in Advance Kavitha
4
by: Luc The Perverse | last post by:
Hi - I have very little C# programming experience. I am making a software product which calls for an interface almost identical to Windows Explorer - and I wondered if mounting a "virtual drive"...
3
by: Killer42 | last post by:
Hi all. Summary Plugging flash drive into work PC, no drive appears. Details First of all, I have searched TheScripts for an answer. The closest I found was this article which covered...
23
by: Rotsey | last post by:
Hi, I am writing an app that scans hard drives and logs info about every fine on the drive. The first iteration of my code used a class and a generic list to store the data and rhis took...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.