|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to show the windows 'Connect To' dialog from C#authorization and authentication. The client application is a windows forms 'smart client'. The client application needs to get the System.Security.Principal.WindowsIdentity.GetCurrent().Token and send it to the middle tier for authentication against role based security defined in ADAM. This works fine when the user is signed into a domain that has been provisioned in ADAM. This does not work for users that do not have a machine joined to the domain. These users sign into a local account and that is what is provied back from the call to GetCurrent().Token. For these users when I get a reject back from the middle tier I want to show them the Windows 'Connect To' dialog and have it do its magic to have the user authenticate against a domain and provide back the token from successfuly authenticating against a domain and user that has been provisioned in ADAM. I am looking for the same interaction that occurs when a user tries to access a windows share and the account they are using is not authorized. I have been unable to find this capabiltiy in the framework. I have also been unable to find this in the Win32 API. Can this be done? I know that I could create my own dialog but I would really prefer that this interaction takes place outside of my code and that I do not have to maintain a users password inside the memory of my application. Thanks for taking the time to try to help. Hello,
the Win32 method you are looking for is CredUIPromptForCredentials. But in fact, it doesn't do the magic of performing the authentication - it just displays the dialog and returns the username/password combination. There are multiple wrappers out there on the internet. I myself have one on my website (see http://www.infinitec.de/libraries/security/default.aspx). Best regards, Henning Krause Show quoteHide quote "Brad Marshall" <Brad Marsh***@discussions.microsoft.com> wrote in message news:D90DAE3C-A875-40EB-87E9-48F6BA2483A4@microsoft.com... >I am trying to build an application that uses Active Directory to perform > authorization and authentication. The client application is a windows > forms > 'smart client'. The client application needs to get the > System.Security.Principal.WindowsIdentity.GetCurrent().Token and send it > to > the middle tier for authentication against role based security defined in > ADAM. This works fine when the user is signed into a domain that has been > provisioned in ADAM. This does not work for users that do not have a > machine > joined to the domain. These users sign into a local account and that is > what > is provied back from the call to GetCurrent().Token. For these users when > I > get a reject back from the middle tier I want to show them the Windows > 'Connect To' dialog and have it do its magic to have the user authenticate > against a domain and provide back the token from successfuly > authenticating > against a domain and user that has been provisioned in ADAM. I am looking > for > the same interaction that occurs when a user tries to access a windows > share > and the account they are using is not authorized. I have been unable to > find > this capabiltiy in the framework. I have also been unable to find this in > the > Win32 API. Can this be done? I know that I could create my own dialog but > I > would really prefer that this interaction takes place outside of my code > and > that I do not have to maintain a users password inside the memory of my > application. > Thanks for taking the time to try to help.
FullTrust on network drive
Unhandled exception vs handled (security issue) Kerberos Token Renewal Why am I getting errors when I want to rebuild the TreeView contro Login error when opening a deployed project User creation.... Forms Authentication with Active Directory, login control crashes Impersonation testing Security Exception Is there a function that I can call to validate a domain? |
|||||||||||||||||||||||