[英]Azure Web service Manage your accout link giving error: 26 - Error Locating Server/Instance Specified)
So this is my first web application that I have launched user Azure, so I am a little new to this. 因此,这是我启动用户Azure的第一个Web应用程序,因此我对此有些陌生。 I finally managed to get the AD authentication working properly, but now once a user is logged in they can not access the "Manage your account" tab that are automatically created for you when you produce a asp.net web app generally found in the /accounts/* directory. 我终于设法使AD身份验证正常工作,但是现在,一旦用户登录,他们就无法访问在生成通常在/中找到的asp.net网络应用程序时自动为您创建的“管理您的帐户”标签。 account / *目录。
When the user clicks on their AD name that directs them to the /Accounts/Manage page they will get this error: 当用户单击将他们定向到/ Accounts / Manage页面的广告名称时,他们将收到此错误:
A network-related or instance-specific error occurred while establishing a
connection to SQL Server. The server was not found or was not accessible.
Verify that the instance name is correct and that SQL Server is configured to
allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
This process works perfectly fine when I run the app locally on my machine but not when its using the AD account information. 当我在计算机上本地运行该应用程序时,此过程运行良好,但当其使用AD帐户信息时,该过程无法正常运行。
My question is why is it doing this? 我的问题是为什么要这样做? and where can I fix it? 在哪里可以解决?
I tested Azure AD using the steps provided in following article. 我使用以下文章中提供的步骤测试了Azure AD。
Developing ASP.NET Apps with Azure Active Directory 使用Azure Active Directory开发ASP.NET Apps
The project template didn't create the default /Accounts/Manage page for me. 项目模板没有为我创建默认的/ Accounts / Manage页面。 I am using Visual Studio 2017. 我正在使用Visual Studio 2017。
That was my first thought, but i could not find a connection string found in the /Accounts/* directory. 那是我的第一个想法,但我在/ Accounts / *目录中找不到连接字符串。
Please also check the web.config in the root directory. 另请检查根目录中的web.config。 Is there a connection string configuration section like following. 是否有如下所示的连接字符串配置部分。 Please note that the local database is not work with Azure Web App, you could store the account information in Azure SQL Database . 请注意,本地数据库不适用于Azure Web App,您可以将帐户信息存储在Azure SQL数据库中 。
<add name="DefaultConnection" connectionString="xxx" providerName="System.Data.SqlClient" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.