简体   繁体   English

如何在c#中检索Metro应用程序的系统登录凭据?

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

I'm developing a metro style application in c#,xaml. 我正在用c#,xaml开发一个metro风格的应用程序。 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 . 启动应用程序时,我想通过将他/她的名称与系统登录凭据(Windows身份验证)进行比较来验证用户我想使用系统登录凭据。 So can anyone help me out how to retrieve the system login credentials for metro apps.If so how ? 所以任何人都可以帮我解决如何检索metro app的系统登录凭据。如果是这样的话?

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. 很难使用Windows凭据,因为允许访问这类数据会带来安全风险,但如果您在WinRT沙箱之外,您可以找出使用什么类型的散列窗口并将其与Windows密码文件进行比较但这很难。

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/ 查看此页面,了解人们访问C#中Windows登录凭据的有限部分的一些方法: 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 这是一个关于在metro应用程序中设置登录的好页面: http//msdn.microsoft.com/en-us/library/windows/apps/hh965453.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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