无法从 Azure 网站访问 Azure DB 服务器

2023-11-23

我使用 Visual Studio 2013 Web Express 创建了一个 MVC Web 应用程序。我已在 Azure 中为我的计算机启用了防火墙规则,并且我可以从本地计算机连接并远程调试我的网站。我让用户 SQL Server 对象资源管理器确认我正在连接到 Azure DB 并且该应用程序运行正常。

但是,当我将应用程序部署到 Azure 时,出现以下连接错误。我已检查以确保该网站具有 Azure DB 作为链接资源。我已使用 FTP 连接到网站并确认 web.config 中的连接字符串正确。

这似乎是我的 Azure 设置中的一些配置问题,但我不知道还需要检查什么。任何建议表示赞赏。

--------------- 收到错误(用户名和跟踪 ID 已更改)------------------------ -

“/”应用程序中的服务器错误。

用户“MyUserName”登录失败。本次会议已被分配 跟踪 ID 为“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”。提供这个 当您需要帮助时,可通过 ID 联系客户支持。
描述:执行期间发生未处理的异常。 当前的网络请求。请查看堆栈跟踪以了解更多信息 有关错误及其在代码中的来源的信息。

异常详细信息:System.Data.SqlClient.SqlException:登录失败 对于用户“MyUserName”。此会话已分配一个跟踪 ID: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'。将此跟踪 ID 提供给 当您需要帮助时的客户支持。

来源错误:

执行期间产生未处理的异常 当前的网络请求。有关原产地和地点的信息 可以使用下面的异常堆栈跟踪来识别异常。

堆栈跟踪:

[SqlException (0x80131904): Login failed for user 'MyUserName'.
This session has been assigned a tracing ID of 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.  Provide this tracing ID to

当您需要帮助时的客户支持。] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException 异常、布尔中断连接、操作1 wrapCloseInAction) +5341687 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +546 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +1693 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +69 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +30 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +317 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +892 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +311 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) +646 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +278 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +732 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +85 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1057 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 次重试,DbConnectionOptions userOptions、DbConnectionInternal& 连接)+78 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection 拥有连接、任务完成源1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +196 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1次重试,DbConnectionOptions userOptions) +146 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection 外部连接、DbConnectionFactory 连接工厂、 任务完成源1 retry, DbConnectionOptions userOptions) +16 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 重试)+94 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry) +110 System.Data.SqlClient.SqlConnection.Open() +96 System.Data.Entity.SqlServer.<>c__DisplayClass2f.<UsingConnection>b__2d() +73 System.Data.Entity.SqlServer.<>c__DisplayClass1.<Execute>b__0() +10 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func1 操作)+189 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(操作 操作)+78 System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection(DbConnection sql连接、操作1 act) +229 System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection, Action1 幕)+376 System.Data.Entity.SqlServer.SqlProviderServices.GetDbProviderManifestToken(DbConnection 连接)+201 System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection 连接)+87

[ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.]
   System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection

连接)+271 System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices、DbConnection 连接)+33

[ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity

框架使用了不正确的连接字符串。检查内部 详细信息例外并确保连接字符串是 正确的。] System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices 提供者服务、DbConnection 连接)+193 System.Data.Entity.Infrastruct.c__DisplayClass1.b__0(元组3 k) +32 System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey 键、功能2 valueFactory) +72 System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.ResolveManifestToken(DbConnection connection) +180 System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) +56 System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +43 System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +62 System.Data.Entity.Internal.RetryLazy2.GetValue(TInput 输入) +123 System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +611 System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(类型 实体类型) +18 System.Data.Entity.Internal.Linq.InternalSet1.Initialize() +53 System.Data.Entity.Internal.Linq.InternalSet1.get_InternalContext() +15 系统.数据.实体.基础设施.DbQuery1.System.Linq.IQueryable.get_Provider() +38 System.Linq.Queryable.Where(IQueryable1 来源、表达1 predicate) +63 Microsoft.AspNet.Identity.EntityFramework.UserStore1.FindByNameAsync(字符串 用户名) +616 Microsoft.AspNet.Identity.d__d.MoveNext() +102 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务 任务)+93 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务 任务)+52 Microsoft.AspNet.Identity.d__15.MoveNext() +243 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务 任务)+93 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务 任务)+52 Berkemeyer.DocumentEngine.Web.Controllers.d__2.MoveNext() +244 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务 任务)+93 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务 任务)+52 lambda_method(关闭,任务)+23 System.Threading.Tasks.TaskHelpersExtensions.ThrowIfFaulted(任务任务) +33 System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult 异步结果)+68 System.Web.Mvc.Async.c__DisplayClass34.b__33(IAsyncResult 异步结果)+16 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase1.结束() +49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult 异步结果)+32 System.Web.Mvc.Async.AsyncInitationWithFilters.b__3c() +50 System.Web.Mvc.Async.c__DisplayClass45.b__3e() +225 System.Web.Mvc.Async.c__DisplayClass30.b__2f(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase1.结束() +49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult 异步结果)+34 System.Web.Mvc.Async.c__DisplayClass28.b__19() +26 System.Web.Mvc.Async.c__DisplayClass1e.b__1b(IAsyncResult 异步结果)+100 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase1.结束() +49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult 异步结果)+27 System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult,ExecuteCoreState内部状态)+13 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +36 System.Web.Mvc.Async.WrappedAsyncResultBase1.结束() +54 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)+39 System.Web.Mvc.Controller.b__15(IAsyncResult asyncResult,Controller控制器)+12 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +28 System.Web.Mvc.Async.WrappedAsyncResultBase1.结束() +54 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)+29 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult 异步结果)+10 System.Web.Mvc.MvcHandler.b__4(IAsyncResult asyncResult、ProcessRequestState 内部状态)+21 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +36 System.Web.Mvc.Async.WrappedAsyncResultBase1.结束() +54 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)+31 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult 结果)+9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9651188 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,布尔值&completedSynchronously) +155

版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.36213


I figured this out on my own. Even though the web.config had the correct connection string, I found a "Connection Strings" section under the Configuration settings for my Azure website that had the wrong password. Correcting the password here fixed my problem.Azure Connection Strings

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法从 Azure 网站访问 Azure DB 服务器 的相关文章

随机推荐

  • jQuery .text() 多个元素同一个类

    我试图在页面上的多个 未知数量 元素上使用 text 考虑 ul li class myClass element1 li li class myClass element2 li li class myClass element3 li
  • 旋转图像时如何避免OutOfMemory ex?

    public static boolean rotateBitmapByExifAndSave File targetFile if targetFile null targetFile exists targetFile canRead
  • MASM:从程序集中访问全局 C 变量

    我正在编写一个程序来转换图像并比较 C 语言和汇编语言处理数据的速度 我有3个项目 C语言的主要项目 C 中的 DLL 来转换图像 ASM中的DLL用于转换图像 在C DLL头文件中 我简单地写了 ifdef PROJEKTC EXPORT
  • 计算一列中行之间的Datediff(超过2条记录)

    我有一个表 其中有一列日期 我想找出它们之间的差异 我已经能够在您的网站上找到一个答案 让我了解两个日期之间的差异 但找不到任何可以让我了解每个客户的几条记录之间差异的答案 我的数据如下 Customer Pstng Date Henry
  • 如何限制 Chrome 中的并发(并行)浏览器请求?

    背景 我注意到几乎所有代理提供商都有 最大线程数 允许 根据我的理解 这意味着一次并发 并行浏览器请求的最大数量 由于现代网站可以有许多并行请求 因此如何在 Chrome 中限制并行请求 全局范围内整个浏览器 不仅针对每个主机 服务器 而且
  • C++ 排序跟踪索引[重复]

    这个问题在这里已经有答案了 您是否有一些有效的例程来返回带有数组中排序元素索引的数组 我认为使用 stl 存在一些方便的方法vector 您是否已经在不使用 stl 的情况下实现了高效的算法 或者您是否有伪代码或 C 代码的参考 使用 C
  • 工具栏和选项卡之间有一条线

    如何删除工具栏和tablayout之间的深线 我在google上搜索有人说 向工具栏和tablayout添加一些标高 我做了但它不起作用 从工具栏和tablyout中删除标高后 它也不起作用 请帮帮我 tablayout xml
  • Clojure 中向量和列表上 conj 的行为差异

    我是 clojure 的新手 最初我正在经历Clojure org and 作弊簿 我想知道不同行为的确切原因是什么conj在列表和矢量上 conj 1 2 3 4 1 2 3 4 conj list 3 2 1 4 4 3 2 1 当我将
  • 为什么在 PHP 中将整数视为数组 ($int[$index]) 不会引发任何错误? [复制]

    这个问题在这里已经有答案了 这只是出于好奇而提出的一个简单问题 我花了一整天的时间调试我的 PHP 代码 发现问题是由于将整数视为数组造成的 x int index this returns null but no error at all
  • 使用 PHP 连接到远程 MySQL 服务器

    我正在尝试使用以下代码从本地计算机虚拟主机连接到远程 MySQL 服务器 conn mysql connect dbhost dbuser dbpass or die mysql error mysql select db dbname c
  • 在Android中对base64字符串中的位图对象进行编码和解码

    我想要编码和解码Bitmap字符串中的对象base64 我使用Android API10 我尝试过使用这种形式的方法来编码 但没有成功Bitmap public static String encodeTobase64 Bitmap ima
  • 覆盖嵌套路由中的参数

    我希望路线的命名约定保持一致 默认参数是 id对于任何资源 但是 如果其中嵌套了另一个资源 则父资源的参数将更改为 parent id 我的路由看起来像 resources users do resources projects do re
  • Python类继承多处理,访问类成员时遇到问题

    简而言之 假设我有以下内容 import multiprocessing class Worker multiprocessing Process def init self multiprocessing Process init sel
  • 将 SELECT-OPTIONS 文本右对齐

    这些是我正在开发的表单的屏幕截图 我想设计表单中的选择框 使选项中的文本右对齐 并且在选择选项后 所显示的所选文本也应显示如下图所示 HTML 代码
  • 在哪里可以找到 WPF DataGrid 或一般 WPF 控件的 XAML 模板? [关闭]

    Closed 此问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 目前不接受答案 我想修改控制模板DataGrid 4 0版本 但我不确定现有的模板是什么样的 有谁知道它是什么或者我在哪里可以找到它 一般来说 对于某些WPF控件
  • 设置 MS-Access DB 以进行多用户访问

    我们正在考虑 增长 一个小型 MS Access DB 其中包含一些表 表单和多个用户的查询 使用不同的后端是另一种更长期的选择 不幸的是目前不可接受 大多数用户将是只读的 但会有一些 当前是一两个 用户必须能够进行更改 而只读用户也正在使
  • 如何在flutter中制作依赖的多级DropDown?

    我试图使依赖的多级下拉列表首先包含州列表 第二个包含城市列表 所有数据都是从 API 获取的 最初 我加载州下拉列表 当我选择州时 如果我选择城市 则加载该州的城市 成功选择城市 但当我更改州值时 会发生错误 如果第一个下拉列表中发生更改
  • tkinter.TclError:字符 U+1f449 超出 Tcl 允许的范围 (U+0000-U+FFFF)

    我正在尝试使用 tweepy 在 Tkinter 窗口上显示我的 Twitter 时间线 这是代码 import tweepy import tkinter consumer key xxxxxxxxxxxxxx consumer sec
  • 使用 Jupyter 中的浏览按钮上传文件并使用/保存它们

    我碰到这个片段用于在 Jupyter 中上传文件 但是我不知道如何将此文件保存在执行代码的计算机上 也不知道如何显示上传文件的前 5 行 基本上我正在寻找正确的命令来访问文件上传后 import io from IPython displa
  • 无法从 Azure 网站访问 Azure DB 服务器

    我使用 Visual Studio 2013 Web Express 创建了一个 MVC Web 应用程序 我已在 Azure 中为我的计算机启用了防火墙规则 并且我可以从本地计算机连接并远程调试我的网站 我让用户 SQL Server 对