简体   繁体   中英

How to retrieve system login credentials in c# for metro apps?

I'm developing a metro style application in c#,xaml. When the application is launched I want to authenticate the user by comparing his/her name with the system login credentials (windows authentication) I want to use the system log in credentials . So can anyone help me out how to retrieve the system login credentials for metro apps.If so how ?

It is difficult to use the Windows credentials as it would be a security risk to allow access to that kind of data, although if you were outside the WinRT sandbox you could find out what kind of hashing windows uses and compare it with the windows password file but this would be difficult.

Check out this page for some ways that people are accessing limited parts of the Windows login credentials in C#: http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/36e1bcfa-a46a-47a8-8b21-78357efe866b/

I think you might have to consider if it is necessary for you to have this kind of functionality when your own login system would suffice.

Here's a good page about setting up a login in metro apps: http://msdn.microsoft.com/en-us/library/windows/apps/hh965453.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM