Last post Jun 01, 2015 08:08 PM by kimosavi
May 29, 2015 06:27 PM|kimosavi|LINK
we are trying to create a website to have the user change and manage their own password with Active Directory, OpenLdap and other system.
when the user changes the password in Active Directory is going to affect its current session, what the user needs to do is lock the screen and sign in again so the new password takes effect.
My questions is a 2 part
#1 is it possible to apply the new password to the current session?
#2 if not is there a way to programatically lock the screen so the user has to sign in again with the new password?
(like User32.dll to perform the lock screen.
Any help will be appreciated!!
System.Diagnostics.Process.Start("shutdown", "-l -t 00")
May 30, 2015 12:57 AM|aakash91|LINK
1 . i dont know where it is possible or not but my personal suggestion is logoff user and make him login again
2. yes you can do it its very simple i will tell you in following step
a. firstly when user enter new password and submit redirect to action where your logic is then redirect it to another action method
b. now in this action method
into controller write code for signout
into view write code for bootstrap modal popup open on loading webpage and show login window make sure use use bootstrap property backdrop static
now on http post redirect this to your logins logic method
this is it very simple and nice
note: its logic that i explain is mvc not web form !
May 30, 2015 10:40 AM|kimosavi|LINK
thank you aakash91!
yes I'm also using MVC WebApi.
my problem is a little bit more complex than signing out, In windows when you change your network (active directory) password it will require you to "log out"
or "lock then screen" and sign back in into windows (not the form), otherwise the password that was change will not take effect.
Jun 01, 2015 08:17 AM|aakash91|LINK
yes this was not possible because jquery is client side scripts whose scope is limited into browser only so you cant access system files or win32 dll.
secondly i cant understand your problem correctly please post in detail problem so people can help you quickly
and lastly i want to ask you if users change password is server side code (mvc) then why you need to access dll files of system? server side code can be executed and take affect so please elaborate your self so i might understand what are you looking for?
Jun 01, 2015 08:08 PM|kimosavi|LINK
when password is change in active directory, you need to log off and log back into windows for the change to take effect, we wanted to force the behavior on the client side. But we will just let the user know they need to perform this otherwise apps (like
outlook) will not work properly.
This does answer my question, I thought this might not be possible.