简体   繁体   English

ASP.NET Web窗体Microsoft OAuth2 redirect_uri问题

[英]ASP.NET Web Forms Microsoft OAuth2 redirect_uri issue

I have created a new WebForms application using the standard template provided in VS2013. 我使用VS2013中提供的标准模板创建了一个新的WebForms应用程序。 I need to integrate Microsoft authentication into it. 我需要将Microsoft身份验证集成到其中。 After going through many tutorials/blogs I have finally.. 经过许多教程/博客后,我终于..

  1. Hosted my webapp on Azure. 将我的webapp托管在Azure上。
  2. Registered my application on account.live.com/developers/ and obtained the Client ID and Secret . account.live.com/developers/上注册了我的应用程序,并获得了Client IDSecret On that portal I have set the redirect_uri to http://myxyzapp.azurewebsites.net/signin-microsoft 在该门户网站上,我将redirect_uri设置为http://myxyzapp.azurewebsites.net/signin-microsoft
  3. I have Updated AuthConfig.cs as.. 我已将AuthConfig.cs更新为..

     public static void RegisterOpenAuth() { OpenAuth.AuthenticationClients.AddMicrosoft( clientId: "----MyClientID----",clientSecret: "----MyClientSecret----"); } 

However when I run the app and enter my Microsoft credentials to login I get the error message : Microsoft account is experiencing technical problems. 但是,当我运行该应用程序并输入我的Microsoft凭据登录时,我收到错误消息: Microsoft帐户遇到技术问题。 Please try again later. 请稍后再试。
The response header says: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is 'https://login.live.com/oauth20_desktop.srf' or a URL which matches the redirect URI registered for this client application. 响应标头说: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is 'https://login.live.com/oauth20_desktop.srf' or a URL which matches the redirect URI registered for this client application. The provided value for the input parameter 'redirect_uri' is not valid. The expected value is 'https://login.live.com/oauth20_desktop.srf' or a URL which matches the redirect URI registered for this client application.

Can somesone please guide me where should I specify this redirect_uri ? 有人可以指导我在哪里指定这个redirect_uri吗? I have gone through many similar questions on SO and other forums but didn't get any specific answer involving WebForms and Microsoft OAuth2. 我在SO和其他论坛上经历了许多类似的问题,但是没有得到涉及WebForms和Microsoft OAuth2的任何具体答案。

使用您的Microsoft帐户登录,然后转到此处https://account.live.com/developers/applications/选择您的应用程序(或创建一个新应用程序),然后按“编辑设置”和“ API设置”,然后找到“重定向URL:“右侧窗格中的字段

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

相关问题 在ASP.NET中为OAuth2创建重定向URI - Creating Redirect URI for OAuth2 in ASP.NET 在ASP.NET 4.5 webforms应用程序中设置OAuth redirect_uri的位置 - Where to set the OAuth redirect_uri in ASP.NET 4.5 webforms application 如何为Microsoft OAuth2提供程序的Native应用程序指定localhost loopback redirect_uri? - How can I specify localhost loopback redirect_uri for Native application for Microsoft OAuth2 provider? Azure ASP.NET 核心 MVC WebApp 的 AD 身份验证 - 如何自定义应用程序的 Redirect_URI! 发送 - Azure AD Authentication for ASP.NET Core MVC WebApp - how to customize the Redirect_URI the APPLICATION! sends 在 ASP.NET Core 的 OpenIdDict 中,指定的“redirect_uri”对于此客户端应用程序无效 - The specified 'redirect_uri' is not valid for this client application in OpenIdDict in ASP.NET Core Microsoft Azure - Google OAuth2重定向URI不匹配 - Microsoft Azure - Google OAuth2 redirect URI mismatch 使用Asp.net 4.0实施OAuth2 - Implement OAuth2 with Asp.net 4.0 asp.net mvc 5和oauth2登录 - asp.net mvc 5 and oauth2 login 改变facebook redirect_uri web api - change facebook redirect_uri web api 带有OAuth2的ASP.NET Web API-使用两因素身份验证时“记住此浏览器” - ASP.NET Web API with OAuth2 - “Remember this browser” when using two factor authentication
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM