I am developing a windows 8 app using c# and xaml. My app should be able to implement windows authentication so that it can allow the logged in user to launch the app. Can anyone help or give me a code snippet to solve this problem???
thanks in advance
To Enable Windows Authentication in windows 8 App
Go to Package.appxmanifest file.
Go to Capabilities tab. Check the Enterprise Authentication feature on the Page.
Include the Namespace
using Windows.System.UserProfile;
Eg to Use the Profile User Name :
txtUserName.Text = await UserInformation.GetFirstNameAsync();
This is how you will get the details of the Windows Authentication user.
Hope this helped you !
You can't do that. Windows 8 "Immersive" applications are sandboxed and have no access to Windows' own user management. In any event user passwords are hashed (a one-way transform), you can't read back the original passwords even if you had access to the SAM file.
If you want a user's Windows password you'll have to ask them up-front, but I gurantee no (intelligent) user would voluntarily agree to this, and chances are your application would be denied on the Windows app-store if you did submit it.
Related
I'm building a software application and it was requested that a user/pass system be implemented with it for security reasons. I'm implementing it in Visual Studio and was curious to if it was possible that I prompt the windows login/pass be used instead of having to build my own structure? Thanks in advance
What you're looking for is the Windows API CredUIPromptForCredentials. Here is how you use it from C# - PInvoke
However, note that this returns the plaintext username and password to your application. This might be a security issue depending on if your user trusts your app or not.
I don't know any way to invalidate the current credentials so Windows forces a prompt for internal NTLM/Kerberos auth.
I'm looking for a way to replace the windows text password login.
My app should be launched automatically and ask the user a few questions, if everything is correct than the user should be allowed to be logged in.
I don't my that a text password will be submitted by my app in the background.
the environment is very similar to face recognition/finger print recognition login.
Where should i start? (:
Thanks
See here:
Windows Credential Provider with C#
and here: http://pgina.org/
(I have no personal experience with this ... as yet.)
This is possible.
Different Windows versions offer different mechanisms to achieve what you want:
in Vista and newer you have to create a Credential Provider
in XP you need to create and a GINA DLL
BEWARE: it might be difficult to do this in .NET, you most probably will need to code a native solution (C/C++ for example).
I thought this would be a very common practice, but I am having a hard time finding anything on how to show the user a default windows authentication credential prompt in c#?
Users will be using this windows forms app to connect to a web service on a different domain, so I cant just pass in the default credentials. These users will have a separate login to access the web service, and I want them to be prompted by the default Windows prompt, and then I can pass their creds through to the web service.
Thanks!
This was answered on SO a while back, I believe. You can use the credential management API. Here's a link with a code example that should get you started.
You need to P/invoke CredUIPromptForWindowsCredentials on Vista and up, or CredUIPromptForCredentials on XP.
I want to create a login form for my desktop application that user can use Windows Live ID for that.
I create an application in manage.dev.live.com and use Desktop Implementation section.
I use a WebBrowser control and navigate to a given address. but I don't know how to receive the token for user.
If I have made a mistake please tell me how to fix that.
As of June 2011, Windows Live ID supports OAUTH 2.0 and should enable you to do that (read more about it). WPF code example can be found at https://github.com/liveservices/LiveSDK/tree/master/Samples/CSharpDesktop.
Anyone heard that it's possible to login to Windows xp programmatically,
I want to modify the way the Domain Controller authenticates the user and if the user authenticated in my special way it returns the user name and password to the service working on the client machine so it should login the user using its passed credentials from the DC without waiting for user to insert his original credentials.
Have a look at this: Gina.dll MSDN
Gina is the system that fingerprint readers etc. use to customise the login screen. You may be able to use this to achieve your purpose?
To future proof your app (Vista and Windows 7) you may wish to look into these: MSDN Mag Vista Credential Providers