简体   繁体   English

SQL Azure DB 在 Web 应用程序备份期间抛出错误“用户登录失败”

[英]SQL Azure DB throws error 'login failed for user' during web app backup

I have a sql azure web app with a connected database.我有一个带有连接数据库的 sql azure web 应用程序。 When I try to automate a daily backup of my web app including the database I get the following error:当我尝试自动执行包括数据库在内的 Web 应用程序的每日备份时,出现以下错误:

'login failed for user ******' '用户 ******* 登录失败'

The asp.net web app is connecting and getting data from the database without error. asp.net web 应用程序正在连接并从数据库中获取数据,没有错误。 This error only happens during the web app backup process.此错误仅在 Web 应用程序备份过程中发生。

I have checked the connection string in both the web app PROPERTIES and the DATA CONNECTIONS blades.我已经检查了 Web 应用程序属性数据连接刀片中的连接字符串。

The connection strings are the same in both blades and look like:两个刀片中的连接字符串相同,如下所示:

Server=tcp:****.database.windows.net,1433;Database=****;User ID=****;Password=****;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30; Server=tcp:****.database.windows.net,1433;Database=****;User ID=****;Password=****;Encrypt=True;TrustServerCertificate=False;Connection Timeout= 30;

If I open SSMS and use the server, password, and user from my connection string I can connect without any issue.如果我打开 SSMS 并使用连接字符串中的服务器、密码和用户,我可以毫无问题地进行连接。

Also, when I got to the Blade for the database in question and click on the activity log, I get no entries and don't see any connection errors此外,当我进入有问题的数据库的 Blade 并单击活动日志时,我没有收到任何条目,也没有看到任何连接错误

Can someone help me figure out why my azure web app cannot backup the database during its backup operation有人可以帮我弄清楚为什么我的 azure web 应用程序在备份操作期间无法备份数据库


EDIT 1:编辑 1:

The activity log linked to an error log file and this is what it contained链接到错误日志文件的活动日志,这就是它包含的内容

<Error>
<Code>AuthenticationFailed</Code>
<Message>
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:f85ceeef-0001-00de-1a27-6cbdab000000 Time:2017-01-11T16:26:09.4122657Z
</Message>
<AuthenticationErrorDetail>
Signature did not match. String to sign used was rwdl 2017-01-08T16:16:47Z 2290-10-23T15:16:47Z /blob/******/$root 2015-04-05
</AuthenticationErrorDetail>
</Error>

I hate these kind of answers,我讨厌这样的答案,

but after getting no help from microsoft RANT BEGIN other than googling my question and returning stack exchange answers to me then suggesting I open a support ticket - which of course is a paid feature... RANT END但是在没有得到微软RANT BEGIN 的帮助之后, 除了谷歌搜索我的问题并将堆栈交换答案返回给我然后建议我打开一个支持票 - 这当然是一个付费功能...... RANT END

SOLUTION My best guess is that there was an issue with the backup configuration because I deleted the existing backup configuration and recreated it with the same values and now it works.解决方案我最好的猜测是备份配置存在问题,因为我删除了现有的备份配置并使用相同的值重新创建它,现在它可以工作了。 Maybe I should have created the Blob container before rather than during the backup setup.也许我应该在备份设置之前而不是在备份设置期间创建 Blob 容器。 I don't know but it is working now.我不知道,但它现在正在工作。

您是否确认 Azure 资源已在 Azure SQL Server 防火墙设置中列入白名单?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM