Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve Azure “Windows logins are not supported in this version of SQL Server”?

right now I am working on a project with .Net CORE c# and entity framework database and I get an error

SqlException: Windows logins are not supported in this version of SQL Server.

I followed a tutorial and I think I did everything fine... The only difference is that I have my database hosted on Azure, it should matters?

Here is my connection string

"DefaultConnection": "Server=firstdb123.database.windows.net;Database=TestDB;Trusted_Connection=True;MultipleActiveResultSets=true",

Here is a picture with my database

enter image description here

I have my EmployeesController and my EmployeeContext made by visual studio so it should be right.. but I don't know why it dose not work

Any help would be awesome

like image 877
Horatiuw Avatar asked Jul 06 '18 08:07

Horatiuw


1 Answers

See that Trusted_Connection=True; bit in your your connection string? That's a Windows shortcut that allows you to bypass the normal username/password credentials on a server.

You need to create secure Azure login, then use that to specify the connection string.

This page shows how a connection string is created in the various different SQL version.

like image 55
Neil Avatar answered Sep 27 '22 23:09

Neil