NEWBIE: Connecting to network share via VB.NET

G

Guest

Hello,

Is it possible to send network credentials to a server via VB.NET? I am
writing an app that needs access to a shared network folder. In order to
gain access to this folder the user must first be authorized. Once the user
is authorized the folder contents can be viewed. What I'd like to do is send
domain/username/password information along with the network folder path. Is
this possible in VB.NET

domain/username:password@\\server\shareddirectory

many thanks,

devin
 
S

solex

devin,

My first question is where is the user running your app from? If it is from
the internet (outside of your local domain) then this would be very bad idea
to try to implement as it would create a huge security risk (I'm not sure it
is even possible).

Other wise you might want to look at ADS (active directory services) there
are many samples on the web and in the microsoft.public.adsi news groups.

Good Luck

Dan
 
G

Guest

Dan,
My first question is where is the user running your app from? If it is from
the internet (outside of your local domain) then this would be very bad idea
to try to implement as it would create a huge security risk (I'm not sure it
is even possible).

The application would be run on a desktop. Running from the web would be
impossible no?
Other wise you might want to look at ADS (active directory services) there
are many samples on the web and in the microsoft.public.adsi news groups.

Thanks for the tip!

cheers,

devin
 
C

CJ Taylor

You might want to look into the Win32API which has all this stuff already in
it... You can just wrap the API call (I did it once awhile ago) and go from
there. Sure, its unmanaged, but thats the way it is. I don't remember if
the System.Net has anything, but I guaruntee the Win32 wrapper will work.

Wish I had some source code, I sniff around and see if I find something, but
that is a much better start than looking into ADS, which really has nothing
to do with mapping network drives unless your running an ADS Server...

And even then... there isn't much correlation. Plus, do you really want to
be dependent on the user having ADS? =)

The application would be run on a desktop. Running from the web would be
impossible no?

have you read about remoting? You can have a shell program that actually
downloads the required DLL's from the web, you just have to define your
security permissions (this can get tough sometimes, well mainly annoying).

hope it helps.

-CJ
 
G

Guest

You might want to look into the Win32API which has all this stuff already in
it... You can just wrap the API call (I did it once awhile ago) and go from
there. Sure, its unmanaged, but thats the way it is. I don't remember if
the System.Net has anything, but I guaruntee the Win32 wrapper will work.

I'll take a look at system.net to see if it has any special calls for
mapping drives.

Wish I had some source code, I sniff around and see if I find something, but
that is a much better start than looking into ADS, which really has nothing
to do with mapping network drives unless your running an ADS Server...

thanks CJ, much appreciated!

And even then... there isn't much correlation. Plus, do you really want to
be dependent on the user having ADS? =)

Very true.

have you read about remoting? You can have a shell program that actually
downloads the required DLL's from the web, you just have to define your
security permissions (this can get tough sometimes, well mainly annoying).

That sounds sweet. I'm just learning VB.NET so that stuff's a long ways away
for me :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top