# Azure SQL Connection

**URL:** <https://forum.radzen.com/t/azure-sql-connection/12352>\
**Category:** Radzen Blazor Studio\
**Created:** [November 26, 2022, 3:51pm UTC](https://forum.radzen.com/t/azure-sql-connection/12352 "2022-11-26T15:51:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![schwibach](https://forum.radzen.com/user_avatar/forum.radzen.com/schwibach/32/12459_2.png) [@schwibach](https://forum.radzen.com/u/schwibach)\
**Post date:** [November 26, 2022, 3:51pm UTC](https://forum.radzen.com/t/azure-sql-connection/12352/1 "2022-11-26T15:51:30Z")

</div>

Hello,

I am trying to access an Azure SQL database.  
I used the same credentials as I use in MSSQL Management Studio and I get this error:

> Login failed for user 'SchB\_Admin'.  
> at Microsoft.Data.ProviderBase.DbConnectionPool.CheckPoolBlockingPeriod(Exception e)  
> at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)  
> at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)  
> at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)  
> at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)  
> at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)  
> at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry, SqlConnectionOverrides overrides)  
> at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides)  
> at Microsoft.Data.SqlClient.SqlConnection.Open()  
> at Microsoft.EntityFrameworkCore.SqlServer.Scaffolding.Internal.SqlServerDatabaseModelFactory.Create(DbConnection connection, DatabaseModelFactoryOptions options)  
> at Microsoft.EntityFrameworkCore.SqlServer.Scaffolding.Internal.SqlServerDatabaseModelFactory.Create(String connectionString, DatabaseModelFactoryOptions options)  
> at Radzen.Server.DatabaseService.Infer(InferDatabaseRequest request) in /Users/korchev/github/radzen-next/Radzen.Server/DatabaseService.cs:line 71  
> ClientConnectionId:30658d7a-ebc0-41cd-b358-230b9dbeb42b  
> Error Number:18456,State:1,Class:14

Can you guys help me out?  
Thanks!

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [November 26, 2022, 4:00pm UTC](https://forum.radzen.com/t/azure-sql-connection/12352/2 "2022-11-26T16:00:54Z")

</div>

Make sure you have checked Encrypt connection.

 ![image](https://forum.radzen.com/uploads/default/original/2X/a/a45145ad6a665117e11394d8f8e16321cb6295a0.png)

---

<div class="post-metadata">

**Author:** ![schwibach](https://forum.radzen.com/user_avatar/forum.radzen.com/schwibach/32/12459_2.png) [@schwibach](https://forum.radzen.com/u/schwibach)\
**Post date:** [November 26, 2022, 4:30pm UTC](https://forum.radzen.com/t/azure-sql-connection/12352/3 "2022-11-26T16:30:32Z")

</div>

Thank you. I did that. Unfortunately that didn't change anything.

Now, I changed the password for the user in the Azure SQL Server and now it doesn't throw an error immediately. It takes a few seconds and then says "Failed to fetch" in the "Code generation settings" window.

 ![image](https://forum.radzen.com/uploads/default/original/2X/2/24cd2ef81392f8265bc549c16cbafe93fa1efd97.png)

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [November 26, 2022, 4:38pm UTC](https://forum.radzen.com/t/azure-sql-connection/12352/4 "2022-11-26T16:38:58Z")

</div>

Failed to fetch means that the RBS server has crashed for some reason. You can restart Radzen Blazor Studio. Also check the [log file](https://www.radzen.com/blazor-studio/documentation/troubleshooting/#log-file) for any exceptions.

---

<div class="post-metadata">

**Author:** ![schwibach](https://forum.radzen.com/user_avatar/forum.radzen.com/schwibach/32/12459_2.png) [@schwibach](https://forum.radzen.com/u/schwibach)\
**Post date:** [November 26, 2022, 5:26pm UTC](https://forum.radzen.com/t/azure-sql-connection/12352/5 "2022-11-26T17:26:05Z")

</div>

I checked this log file

 ![image](https://forum.radzen.com/uploads/default/original/2X/6/6584ff252338a5fa3a147a0f5d5af02cf24fc6ab.png)

I restarted Radzen Blazor Studio at 18:15 and get the same error.  
However, that's all that's in the log file.

[2022-11-26 17:45:06.158] [info] Checking for update  
[2022-11-26 17:45:06.593] [info] Update for version 1.0.4 is not available (latest version: 1.0.4, downgrade is disallowed).  
[2022-11-26 18:16:50.989] [info] Checking for update  
[2022-11-26 18:16:51.441] [info] Update for version 1.0.4 is not available (latest version: 1.0.4, downgrade is disallowed).

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [November 27, 2022, 8:15am UTC](https://forum.radzen.com/t/azure-sql-connection/12352/6 "2022-11-27T08:15:06Z")

</div>

The only option left to troubleshoot is to give us somehow access to that database - maybe some restricted user credentials and we will try to connect. You can send the details over email at [info@radzen.com](mailto:info@radzen.com)

---

<div class="post-metadata">

**Author:** ![schwibach](https://forum.radzen.com/user_avatar/forum.radzen.com/schwibach/32/12459_2.png) [@schwibach](https://forum.radzen.com/u/schwibach)\
**Post date:** [November 29, 2022, 4:57pm UTC](https://forum.radzen.com/t/azure-sql-connection/12352/7 "2022-11-29T16:57:19Z")

</div>

Thank you! The new update to Radzen Blazor Studio fixed it for me.
