When you see the code does not work and you don't know where the error is, remove all try...catch. This will help to understand the problem. The error here is, probably, in that way you are trying to check if user is got authenticated (IsAuthenticated method).
The
DirectoryEntry class does not require "uid=" + username + ",cn=***,o=***,dc=***,dc=***,dc=***". It used userid. So, you need to change
The code above is working fine , it authonticate user and direct him to the page.aspx , what i need is retrieve some value from active directory like name , id , etc and send it to page.aspx ..
Member
9 Points
135 Posts
i need to get data from active directory and display them in new page after authonticating the us...
Dec 22, 2010 02:37 AM|anazahrani|LINK
Hello there ..
I have below code which authonticate users ; i need to display some data retrieced from active directory once the user logged in
i could not get it :(
here is the code in App_Code folder :
here is the code in login.aspx
i need to list the data ( email , name .... ) in page.aspx
Thank you ..
All-Star
35149 Points
9075 Posts
Re: i need to get data from active directory and display them in new page after authonticating th...
Dec 22, 2010 04:49 AM|smirnov|LINK
When you see the code does not work and you don't know where the error is, remove all try...catch. This will help to understand the problem. The error here is, probably, in that way you are trying to check if user is got authenticated (IsAuthenticated method). The DirectoryEntry class does not require "uid=" + username + ",cn=***,o=***,dc=***,dc=***,dc=***". It used userid. So, you need to change
Hope this helps.
Member
9 Points
135 Posts
Re: i need to get data from active directory and display them in new page after authonticating th...
Dec 22, 2010 05:54 AM|anazahrani|LINK
Actually i forgot to tell you that the code is working fine , but the problem i'm facing is how to retrieve the data
like ( name , email ... ) and
display them in page.aspx ???
can you add something to the above code please , so it surve my purpose ??
Thank you ...
Member
9 Points
135 Posts
Re: i need to get data from active directory and display them in new page after authonticating th...
Dec 22, 2010 07:51 AM|anazahrani|LINK
The code above is working fine , it authonticate user and direct him to the page.aspx , what i need is retrieve some value from active directory like name , id , etc and send it to page.aspx ..
i hope it's clear now ....
Thank you
All-Star
35149 Points
9075 Posts
Re: i need to get data from active directory and display them in new page after authonticating th...
Dec 22, 2010 09:01 AM|smirnov|LINK