问题
I'm having problems authenticating against dbs on azure. All the details are right but when I click connect I get the following error:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Error connecting to 'tcp:xyz.database.windows.net,1433'.
------------------------------
ADDITIONAL INFORMATION:
Failed to connect to server tcp:xyz.database.windows.net,1433. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
One or more errors occurred. (mscorlib)
------------------------------
One or more errors occurred. (mscorlib)
------------------------------
Failed to parse XML blob.
Reason: XML document must have a top level element.
Line: 0, Position: 0
Text: (null) (System.Data)
I already uninstalled everything related to SQL and SQL Management Studio and still no luck. I tried connecting with my account in other machine and works, so it seems is something on my machine.
Any suggestions?
UPDATE: I tested another user on my machine and does work, so it must be something with my user on my machine!
回答1:
Leaving this here as this SO article is the top result for "SSMS Failed to parse xml blob". I got this error when I was capturing traffic with Fiddler 4 AND running SSMS at the same time. If you are running Fiddler 4, please close it and try again!
回答2:
Ok after multiple attempts to sort this out, I finally got it fixed. Follows the steps that worked for me:
- Uninstall SQL and SQL Managment Studio
- Delete SQL folders from Program Files
- Open "regedit" and delete following entries:
- HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server 2012 Redist
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server 2017 Redist
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Native Client 11.0
- Install CCleaner and run registry clean
- Restart PC
- Install SQL Managment Studio
回答3:
I was facing this tonight. The connection worked while I was at the office but was failing when connected via the work VPN. I thought I'd have to go into the office. One of my teammates suggested I check and make sure my IP connectivity, and especially DNS, was set to automatic.
- I disconnected from the VPN
- Set IP & DNS to Automatic
- Reconnected VPN
- Connected to Azure SQL via SSMS successfully
I hope this helps someone else.
来源:https://stackoverflow.com/questions/50533420/failed-to-parse-xml-blob