[英]MVC webapp with Azure AD authentication works fine in local but not when porting to Azure app services
I have created web app by following below steps to implement the Azure active directory authentication(Work or school account authentication) to my Mvc webapp. 我已按照以下步骤创建了Web应用,以对我的Mvc Web应用实施Azure Active Directory身份验证(工作或学校帐户身份验证)。
When I create the project in MVC web app itself it asks authentication mode of the project . 当我在MVC Web应用程序本身中创建项目时,它会询问该项目的身份验证模式。 So that I have changed the authenticate mode to Work or School account authentication.
因此,我已将身份验证模式更改为工作或学校帐户身份验证。 After checking this, it populates directory by default and I have checked the Read directory data.
选中此选项后,默认情况下将填充目录,而我已检查了Read目录数据。
After clicking create, the visual studio itself generates the following file for Work or school account authentication I beleive, 单击创建后,Visual Studio本身会生成以下文件以供我相信的Work或学校帐户身份验证,
Once I run the app from visual studio it works fine that as usual it goes to Microsft online page and if it succeeds the authentication it came to the home controller of the web app. 一旦我从Visual Studio运行了该应用程序,它就可以正常工作,可以像往常一样转到Microsft的在线页面,如果它成功通过了身份验证,则会到达该Web应用程序的主控制器。
To check with azure app service, we have created the web app in Azure webservices and copied the code base to mentioed remote folder by FTP client. 为了检查azure应用程序服务,我们已经在Azure webservices中创建了该Web应用程序,并通过FTP客户端将代码库复制到了指定的远程文件夹中。 But now it gots the error like screen shot.
但是现在出现了屏幕截图之类的错误 。
(Ps : I'm using App Service plan/pricing tier as FREE TIER also not adding the SSL Certificates to my web app) (注:我使用App Service计划/定价层作为免费套餐,也没有将SSL证书添加到我的Web应用程序中)
As @Chetan said , you can't use localdb/sqlexpress with Azure app service. 如@Chetan所说,您不能将localdb / sqlexpress与Azure应用服务一起使用。 You could use SQL Azure , or you could connect to on-premises SQL Server from a web app in Azure App Service using Hybrid Connections
您可以使用SQL Azure,也可以使用混合连接从Azure App Service中的Web应用程序连接到本地SQL Server
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.