我的应用程序中的验证错误 [英] Authentication error in my application

查看:91
本文介绍了我的应用程序中的验证错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个可以在Intranet上运行的应用程序。它有两个面板用户和管理员。



用户面板有两个页面,一个页面从数据库读取数据,但是第二个页面使用当前登录Windows用户并检索详细信息来自Active Directory。并且用户还可以更改某些字段并直接保存到AD。



管理面板用于从Active Directory读取用户详细信息,并在数据库中显示存储在用户面板的第一页。



在web.config文件中,我使用模拟与Active Directory进行交互。身份验证模式定义为

表单,因为管理面板需要登录(使用AD凭据)。

I have developed an application that will run on Intranet. It has two panels User and Admin.

The User panel has two pages, one page reads data from database, however second page use currently logged in Windows user and retrieve details from Active Directory. and the user can also change some fields and save to AD directly.

The Admin Panel is used to read user details from Active Directory and stores in database that are display on first page of User panel.

In web.config file I have used impersonation to interact with Active Directory. Authentication mode is defined as
"Forms" since the Admin panel requires loging (using AD credentials).

<identityimpersonate="true"userName="*****"password="*****"/>
<authenticationmode="Forms">
<formsname=".ADAuthCookie"loginUrl="*****"timeout="**"slidingExpiration="false"protection="All"/>
</authentication>



在IIS中我使用了基本设置中的应用程序用户(通过身份验证),因为如果我定义了任何特定用户,那么它会在用户面板的第二页上显示该用户的详细信息。但现在它要求用户名和密码,我不希望应用程序要求输入用户名和密码,它应该自动使用当前登录的Windows凭据。

如果还有其他信息,请告诉我可能有助于理解我的问题的细节。

问候,



我尝试了什么:



需要针对此问题的智能答案


When deplying on IIS I have used "Application user (pass through authentication)" in Basic Settings, because if i define any specific user then it showed the details of that user on second page in User panel. But now it is asking for username and password, i do not want the application to ask for username and password it should automatically use the currently logged-in windows credentials.
Let me know if there is any additional detail that might help understand my problem.
Regards,

What I have tried:

Need a Smart Answer for this problem

推荐答案

要使用当前凭据自动登录,用户需要与网络服务器位于同一个AD域。



如果他们使用的是Internet Explorer,他们将需要将您的网站添加到本地Intranet区域。



如果他们使用Chrome,它使用与IE相同的设置,那么他们仍然需要将您的网站添加到IE的本地Intranet区域。



如果他们使用的是Firefox,他们需要修改高级设置。在 about:config 中,他们需要将您的网站添加到 network.automatic-ntlm-auth.trusted-uris 设置。或者,他们可以通过简单的UI安装扩展来管理此设置:

在Firefox中启用NTLM身份验证(单点登录) [ ^ ]
To automatically log in with the current credentials, the users will need to be in the same AD domain as the web server.

If they're using Internet Explorer, they will then need to add your site to the "Local Intranet" zone.

If they're using Chrome, that uses the same settings as IE, so they'll still need to add your site to IE's "Local Intranet" zone.

If they're using Firefox, they'll need to modify the advanced settings. In about:config, they will need to add your site to the network.automatic-ntlm-auth.trusted-uris setting. Alternatively, they can install an extension to manage this setting through a simple UI:
Enabling NTLM Authentication (Single Sign-On) in Firefox[^]


这篇关于我的应用程序中的验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆