无法将Web应用程序(asp.net)连接到azure活动目录 [英] can' t connect web application (asp.net) to aazure active directory
问题描述
我正在尝试将使用asp.net(非MVC)开发的现有应用与azure AD连接起来.但是request.Isauthenticated仍然是错误的.我访问了很多论坛,但没有找到解决方案.需要帮助...
I'm trying to connect an existing app developed in asp.net (non MVC) with azure AD. But request.Isauthenticated is still false. I visited a lot of forums and I didn' t find a solution. Need help please...
推荐答案
你好,
您在哪里遇到此问题?您是否正在使用OpenID Connect存储用户令牌?
Where do you encounter this issue? Are you using OpenID Connect to store the user tokens?
我会尝试两件事:
1.确保已设置身份验证cookie.
1. Ensure that you have set the authentication cookies.
System.Web.Security.FormsAuthentication.SetAuthCookie(user.Username, false);
2.确保已在web.config中启用了表单身份验证.
2. Ensure that you have enabled forms authentication in the web.config.
<system.web>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="2880" />
</authentication>
...
</system.web>
此线程可能会将您引向需要的地方.
This thread may lead you where you need to be.
这篇关于无法将Web应用程序(asp.net)连接到azure活动目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!