Sign in | Join
Last post 07-05-2007 1:24 AM by mvark. 4 replies.
Sort Posts: Oldest to newest Newest to oldest
hi,
Can anyone suggest me that how can i get the derver name by using asp.net from the localhost computer. so that i can give the server name at LDAP://{servername}
thanks in advance
aks
try setting debugging on, then you see all kind of interesting servervariables :)
(dont know them exactly from memory)
You don't need a server name as you can bind serverless. Either you can bind to the namespace of AD or you can bind to RootDSE and then get the well-known naming context of defaultnamingcontext
hi paul,
Ya you right but not in the case when you are using local machine account.
Means You can't use it from local machine :)
any way, Thanks for your interest
Use -Request.ServerVariables["SERVER_NAME"] or Request.ServerVariables["LOCAL_ADDR"] The list of Server Variables that you can extract info from, is here - http://www.w3schools.com/asp/coll_servervariables.asp