is it possible that when i start a windows form application , it automatically picks up the username and password from the credential entered at the starting of the windows and login the user automatically.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Picking up password is never possible as it is a security threat.
Depending on the language your WinForms application is written in, there might be several methods to get the Username of the user currently logged in.
In C#, you can get it like this:
Once, you have the username, you can assume that the user is already authenticated as he is logged in to the machine.
Hence, you can then bypass ASP.NET Forms authentication by creating a custom page which “logs in” the user obtained above:
You can then call the page thus: http://localhost/sso/sso.aspx?username=Varun+Chatterji
DISCLAIMER: This is sample code and not meant for production. If you implement a “login” in this fashion using query string alone, you must secure the login by some form of authentication in sso.aspx