Windows authentication
-
Dear All, Please let me know how can I implement Windows Authentication for a windows application using c# ? Thanx & Regards
-
Dear All, Please let me know how can I implement Windows Authentication for a windows application using c# ? Thanx & Regards
Mr Perfect wrote:
Please let me know how can I implement Windows Authentication for a windows application using c# ?
Well, it should already be running in the context of the user that launched it. So you just need to get hold of the current Identity:
using System.Security.Principal;
...
WindowsIdentity wi = WindowsIdentity.GetCurrent();From there you can get hold of various information that you would likely find useful.
Upcoming events: * Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services... Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
-
Dear All, Please let me know how can I implement Windows Authentication for a windows application using c# ? Thanx & Regards
If there was something wrong with the answer I gave, please let me know. Don't vote me down indiscriminately.
Upcoming events: * Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services... Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website