Azure SQL Database connection exception (excluded System.Data.SqlClient.SqlException)

I am working on an ASP.NET MVC project and I started from scratch. I just want to use the SQL database hosted on Azure in my project.

System.Data.SqlClient.SqlException (0x80131904): Login failed for user "myname". In this session, the trace identifier '00dbcf81-35eb-4d92-b022-da1bca001e5f' was assigned. Provide this trace identifier for customer support when you need help.

What I've done:

  • I set up the web.config connection string using a single Azure management portal. I copied and pasted directly.
  • I configured a firewall on my computer - both outbound and inbound with port 1433 enabled
  • On the Azure Management Portal, I put my IP address in a list.
  • I can use my password and username to successfully connect Azure db using SQL Server Management Studio. Everything is working fine.
  • I also installed "Allow other Windows Azure services to access this server"

Here is my connection string:

<add name="DefaultConnection" connectionString="Server=tcp:myserver.database.windows.net;Database=aspnet-WebApplication1-20140927090028;User ID=myid;Password={mypsw};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" providerName="System.Data.SqlClient" />

I checked all the posts here and did not find much useful information.

Any help is greatly appreciated.

Thank.

+1
source share
2 answers

FINALLY. Solvable.

PAY ATTENTION to the connection string provided by the Azure portal. You must remove the parentheses for the password. THIS!

+1
source

There seems to be something wrong with the permissions listed below. Check your username and password carefully.

System.Data.SqlClient.SqlException(0x80131904): 'myname'. '00dbcf81-35eb-4d92-b022-da1bca001e5f'. , .

0

Source: https://habr.com/ru/post/1674014/


All Articles