I am not able to login with Windows Authentication in SQL cluster scenario (Always on high availability)

120 views Asked by At

I am using SQL Cluster scenario with Always on high availability scenario. Everything works fine with the SQL Authentication but it is not working with the windows authentication.

The connection string I am using is

DataSource=tcp:AG-Listener,1433;Initial Catalog=TestDB;MultipleActiveResultSets=True;Persist Security Info=false;Integrated Security=SSPI;MultiSubnetFailover=True;

The main problem I am facing is that it shows the error "Login failed with the wrong user name" i.e.:"domain\huhassan-lp" and I am expecting it to login with "domain\h.Hassan".

I already added the following things in the app.config

<system.web>
<authentication mode="Windows" />
<identity impersonate="true" /></system.web>

I already did user mapping with SQL access.

My SQL Windows Authentication username: domain\h.Hassan

My Windows user: domain\huhassan-lp

SQL Exception

0

There are 0 answers