使用Visual Studio 2017使用Windows身份验证将Web App部署为Azure [英] Deploy Web App to azure using Windows authentication using Visual studio 2017
问题描述
I am deploying an Web forms app to Azure using Visual Studio 2017.
该网络应用正在使用Windows身份验证&被部署没有任何错误,但被重定向到
The web app is using windows authentication & gets deployed without any error but gets redirected to
https://localhost:44334/
当我使用Windows身份验证时,它正确使用了我的azure凭据登录并重定向到本地主机.
As I am using Windows authentication it correctly uses my azure credentials to log me in and redirects to the localhost.
在网络配置中,我更改了
In the web config I changed the key for
ida:PostLogoutRedirectUri
to the Azure app service url.
在localhost上运行正常,但是当我更改webconfig url时,它仍将页面重定向到
错误代码:INET_E_RESOURCE_NOT_FOUND
It works fine on localhost but when I changed the webconfig url it still redirects the page to
https:/localhost:4434
and gives an error
Error Code: INET_E_RESOURCE_NOT_FOUND
<appSettings>
<add key="ida:ClientId" value="123751ce-1232-4d79-ba57-86ab32293f9e" />
<add key="ida:AADInstance" value="https://login.microsoftonline.com/" />
<add key="ida:Domain" value="myaccount.onmicrosoft.com" />
<add key="ida:TenantId" value="09bacfbd-47ef-4465-9265-3546f2eaf6bc" />
<add key="ida:PostLogoutRedirectUri" value="https://myportal.azurewebsites.net/" />
我点击了此链接
I followed this link
https://docs.microsoft.com/en-us/aspnet/core/tutorials/publish-to-azure-webapp-using-vs?view=aspnetcore-2.2
是否缺少我所需要的Web配置或设置.
Is there a web config or setting that I am missing.
我想在推荐答案
您是否正在Azure云服务,VM或应用程序服务中运行此应用程序? Are you running this app inside a Azure Cloud Service, VM or App Service? 如果您在云服务中运行,我们会自动为您提供DNS名称 If you are running in a cloud service we automatically provide you with a DNS name 以下是您可以遵循的示例: Here is an example you could follow: https://docs.microsoft.com/zh-CN -us/azure/cloud-services/cloud-services-dotnet-get-started 如果您在VM内运行,则必须手动配置DNS名称以与公共IP关联 If you are running inside a VM, you have to manually configure a DNS name to associate with the Public IP 如果您正在使用Web应用程序,则在创建服务时会为您的应用程序提供一个URL.或者,您也可以配置自定义域名 And if you are using a Web App you are provided a URL for your app when creating the service. Or you can configure a custom Domain name as well 这篇关于使用Visual Studio 2017使用Windows身份验证将Web App部署为Azure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!