【发布时间】:2018-02-09 10:24:54
【问题描述】:
我将在Publish the server project 之后发布我的 Azure 应用服务(.Net 后端)
以前可以,但现在我不能让它工作了。当我在 Visual Studio 中单击发布时,它会构建并显示
"========== Publish: 1 succeeded, 0 failed, 0 skipped =========="
但是在之后打开的网络浏览器选项卡中(通常会出现“此移动应用程序已启动并正在运行”屏幕)它会将我发送到https://login.microsoftonline.com/{domain}.onmicrosoft.com/oauth2/v2.0/authorize?response_type=...,然后立即将我重定向到msala{custom-redirect-uri}://auth,这是重定向我的本机应用中 Azure AD B2C 的 URI。
在 Azure 门户中我的应用服务的活动日志中,我也没有看到更新。当我查询数据库时,结构并没有按应有的方式改变。
那么那里发生了什么以及为什么重定向到自定义重定向 URI? Azure AD B2C 与发布后端项目有什么关系?
更新:
检查打开的网页,我看到以下内容:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd' >
<html xmlns = 'http://www.w3.org/1999/xhtml' >
<head>
<title> Logging in... </title>
<meta name = 'CACHE-CONTROL' content = 'NO-CACHE' />
<meta name = 'PRAGMA' content = 'NO-CACHE' />
<meta name = 'EXPIRES' content = '-1' />
</head>
<body >
<form id = 'auto' method = 'post' action = 'msal{Client_id}://auth'>
<div>
<input type = 'hidden' name = 'error' id = 'error' value = 'redirect_uri_mismatch' />
<input type = 'hidden' name = 'error_description' id = 'error_description' value = 'AADB2C90006: The redirect URI 'https://{domain}.azurewebsites.net/.auth/login/aad/callback' provided in the request is not registered for the client id '{Client_id}'.
Correlation ID: 9569081c-2779-41e8-8b20-095384de402f
Timestamp: 2018-02-06 18:53:38Z
'/>
<input type = 'hidden' name = 'state' id = 'state' value = 'redir=%2F' />
</div>
<div id = 'noJavascript' style = 'visibility: visible; font-family: Verdana' >
<p> Although we have detected that you have Javascript disabled, you will be able to use the site as normal. </p>
<p> As part of the authentication process this page may be displayed several times.Please use the continue button below. </p>
<input type = 'submit' value = 'Continue' />
</div>
<script type = 'text/javascript' >
< !--
document.getElementById('noJavascript').innerHTML = '';
document.getElementById('auto').submit();
//-->
</script></form></body></html>
我仍然看不到从我的本机应用程序客户端(客户端 ID)到我的 .Net 后端应用程序服务的连接。当然它们是连接的,但帽子不应该对发布他的后端有任何影响
【问题讨论】:
标签: azure azure-mobile-services azure-ad-b2c azure-web-app-service