gpt4 book ai didi

c# - 尝试连接到 Azure SQL 时提供程序未返回 ProviderManifestToken 字符串

转载 作者:行者123 更新时间:2023-12-03 04:36:46 32 4
gpt4 key购买 nike

我正在连接到 Windows Azure SQL,但收到错误提供程序未返回 ProviderManifestToken 字符串。这曾经有效,直到我不知道的一些事情发生了变化。当 VS2013 向导创建 Web 应用程序时,我使用了默认设置。我也使用 Entity Framework ,但我有不同的连接字符串和 DBContext。

连接字符串是如下所示的 DefaultConnection。

"DefaultConnection" connectionString="data source=tcp:lzol9w71f5.database.windows.net,1433;Database=Eye-Analytics;User ID=Eye-Analytics@lzol9w71f5;Password=[not displayed];Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" providerName="System.Data.SqlClient"

Line 48: if (ModelState.IsValid) Line 49: { Line 50: var user = await UserManager.FindAsync(model.UserName, model.Password); Line 51:
if (user != null) Line 52: {

Source File: c:\Users\grbrand\Documents\Workspaces\EA-Cloud\Eye-Analytics-Azure-Cloud-WebRole\Controllers\AccountController.cs Line: 50

[ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.]
System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +558
System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) +94

[ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.]
System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) +358

最佳答案

检查您尝试访问 SQL Azure DB 的计算机的 IP 是否已列入白名单。您可以从 Azure 管理门户执行此操作。

关于c# - 尝试连接到 Azure SQL 时提供程序未返回 ProviderManifestToken 字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21506868/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com