Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i pass network credentials to AC?

Status
Not open for further replies.

atanoli

Technical User
Oct 28, 1999
156
PK
I have win2k server (myserver) with Active Directory. Another standalone server (printsrv), this is also my web server. I developed a site and hosted at (printsrv). Now I want to make a link at my site so that my Active Directory’s user can access their network drive which is located at (myserver) server.

I set windows authentication at my website (printsrv) and whenever a person will click that link it will ask for user name and password. Its all working fine. But now when I am programmatically going to access the share of user at (myserver) he is asking me for password and whatever password I am giving he is not authorizing me to access their network shares. Although I am giving my domain’s administrator password. Here is my code in c#:

How i can pass my username and password alongwith following activity in c#?

string[] achDrives = Directory.GetDirectories("\\\\myserver\\username");

I am developing my site in ASP.Net.

How I can access my shares from domain controller server through web?

Thanks in advance
 
Thanks for reply SithlOrd, but sorry i couldn't understand what u r trying to say.

I only want a method that how i can pass (user,password,domain) credentials to myserver from printsrv(this is standalone server with the member of myserver domain).
 
The the standalone server must be part of the DOMAIN so you need to join it making it a member server.

Standalone servers can not authenticate to a AD unless it is a member.

To make it a member go into system properties then computer name then network id and follow the wizard.

Then you need to go through the security adding the groups or user to the stuff they need to access.

 
Thanks jjgraf.

But let me make this more clearer to u:

I can access share folders on myserver, but actually i wan to access that folders and files which are not shared. I am administrator and i want to accesss c$ permissions like.

I want to supply my admin password from c# code so that i can access all the data which is not shared.

Waiting
 
Well if the server is standalone it will need to have it's own User accounts which you will need to supply to it every time you access that drive.

If it's a memeber server and your log in a administrator or part of the administrator group every time you access the Admin share c$ it will pass your credentials.

or you could do a mapped drive and it will save the user password to log in automaticaly.

 
Yes jjgraf I also thought that it will work. But unfortunately its not working.

My printsrv is member of myserver domain.
 
i do every thing i have said on a daily bases and i'm a member of Domain Admin and Administrator group

it should be working

something in security is messed up somewhere.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top