简体   繁体   English

使用Azure Active Directory进行身份验证的Web应用

[英]Web app using Azure active directory for Authentication

I am using the below sample code to create a simple web app (I have not incorporated web API yet) https://github.com/Azure-Samples/active-directory-dotnet-webapp-webapi-openidconnect 我正在使用下面的示例代码创建一个简单的Web应用程序(我尚未合并Web API) https://github.com/Azure-Samples/active-directory-dotnet-webapp-webapi-openidconnect

I was able to debug the application without any errors. 我能够调试该应用程序而没有任何错误。 But when I deployed the app to Azure, I followed the steps to change the 1) Sign-On URL 2) Reply URL to the web site address. 但是,当我将应用程序部署到Azure时,我按照步骤更改了1)登录URL 2)答复URL到网站地址。 Now when I try to access my website it tries to authenticate me and then it just gives me back status code 500. Any idea what I might be missing here? 现在,当我尝试访问我的网站时,它会尝试对我进行身份验证,然后仅返回状态代码500。我知道我在这里可能会缺少什么吗?

Make sure to enable SSL on your website and the return url is the https url. 确保在您的网站上启用SSL,返回网址为https网址。 When you change the https url, shut down the webserver and re-run. 当您更改https url时,请关闭Web服务器并重新运行。

That sample should not require ANY DB. 该示例不需要任何数据库。 The cache used there is the NaiveTokenCache (see https://github.com/Azure-Samples/active-directory-dotnet-webapp-webapi-openidconnect/tree/master/TodoListWebApp/Utils ), which uses the Http session. 那里使用的缓存是NaiveTokenCache (请参阅https://github.com/Azure-Samples/active-directory-dotnet-webapp-webapi-openidconnect/tree/master/TodoListWebApp/Utils ),它使用Http会话。 Either you modified the sample to switch the cache, or you are talking about something else (in which case, I recommend specifying the exact bits you are dealing with). 您修改了样本以切换缓存,或者您正在谈论其他内容(在这种情况下,建议您指定要处理的确切位)。

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

相关问题 使用Active Directory身份验证在ASP.NET Core Web应用程序中创建用户 - Create users in ASP.NET Core web app using Active Directory authentication 默认情况下使用Azure Active Directory登录页在IIS中托管的ASP.NET Web App - ASP.NET Web App hosted in IIS using Azure Active Directory Sign in Page by default 从Office 365启动Web应用程序的Azure Active Directory流 - Azure Active Directory Flow for Web App Launched from Office 365 使用(Azure 活动目录 b2c)Json Web 令牌验证的 ASP.NET SignalR 客户端-服务器身份验证 - ASP.NET SignalR client-server authentication using (Azure active directory b2c) Json web token validation ASP.NET中的Azure Active Directory身份验证 - Azure active directory authentication in asp.net 具有活动目录和Windows身份验证的asp.net c#Web应用程序 - asp.net c# web app with active directory and windows authentication 在内部网站上使用Active Directory身份验证 - Using Active Directory authentication on a internal website Forms 使用 Active Directory / LDAP 进行身份验证 - Forms Authentication Using Active Directory / LDAP 将信息存储在活动目录中并使用Windows身份验证 - Storing information in active directory and using Windows Authentication 在Intranet中使用Active Directory进行登录身份验证...可能吗? - Login Authentication using Active Directory in the Intranet…Possible?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM