Windows logins are not supported in this version of SQL Server

 

Bildiğiniz üzere Windows Azure ile beraber artık güncel sunucularımızı da Windows Azure üzerine yavaş yavaş taşımaya başladık.

Konumuz Asp.Net üzerinde Code First migration ile Windows Azure standart SQL database üzerine database kurulumunda alınan Windows logins are not supported in this version of SQL Server hatasının çözümüdür.

Veri tabanı dosyasını oluşturdunuz uygulamanızı da localde test ettiniz. Azure üzerinde müşterinize yada arkadaşlarınıza sistemi göstermek istiyorsunuz ama aşağıdaki hatayı alıyorsunuz .

Server Error in ‘/’ Application.

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Windows logins are not supported in this version of SQL Server.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Windows logins are not supported in this version of SQL Server.]

System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +414

System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78

System.Data.Pro

Aslında hatanın Azure üzerinde çözümü için bayağı bir makale okuduğumu söylemem gerekli, bir sürü arkadaşımızın da bu konu hakkında görüşlerine başvurduk. En son bir SQL sunucu kurarak ( VM ) üzerinde denedik sorun başka bir şekilde kendini gösterdi.

Sırası ile aşağıdaki işlemleri Mevcut Azure Database üzerinde uyguladım.

1 – Azure veritabanı dosyanızı Standart dan Premiuma yükseltin. Bu işlem yaklaşık olarak 24 saat kadar sürmektedir.

2 – Daha sonra Visual Studio da bulunan projeniz içindeki web.config dosyanızdaki connection string’e aşağıdaki eklemeleri yapınız.

Trusted_Connection=False;
Encrypt=True;
Connection Timeout=30;
Integrated Security=False;
TrustServerCertificate=True;
User Instance=false

Ve tamamdır. Şimdi burada hocam bütün alayını eklemişsiniz seslerini duyar gibiyim. maalesef çözüm bu yönde oldu ve sağlıklı olarak çalışmakta.

Saygılarımla

Leave a Reply