ASP.NET Windows身份验证登录屏幕

时间:2015-04-01 14:26:53

标签: c# asp.net asp.net-mvc authentication

我有一个iPad应用程序,我希望为它添加身份验证。我有一个登录页面,其中包含应用程序中的用户名和密码字段。

现在我可以将用户名和密码发送到ASP.NET API。现在我要做的是获取用户名和密码,并使用Windows身份验证对该用户进行身份验证以进行登录。登录后,我可以在他们做任何事情之前对他们进行身份验证(即运行查询)

我找到了这篇文章:

http://geekswithblogs.net/manjunath.k/archive/2014/09/23/windows-authentication-in-asp.net-web-application.aspx

似乎我想做这样的事情:

var user = username; (username comes from the app)
if(user.IsInRole(WindowsBuiltInRole.Administrator)){
    //user exists
}

但我如何验证密码?我很困惑。

0 个答案:

没有答案
相关问题