none
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. RRS feed

  • Question

  • I have web server on Microsoft Azure VM.

    I have SQL server 2012 Ent part of Active directory on different machine not on azure.

    I am able to connect to SQL server using SSMS via SQL authentication.

    But I am unable to connect to SQL server via connection string as below 

    <add name="ConnectionString" connectionString="Server=104.130.115.32;Database=BullsEye;uid=test;pwd=password" providerName="System.Data.SqlClient" />

    but I am getting below error in my we application log

    Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

    SQL server is part of active directory environment.

    Web server is part of workgroup environment.

    I can access SQL via SSMS but not from my application via SQL connection string.

    "uid=test;pwd=password" test is SQL user not windows user.

    And I am connecting using SQL user "test" not windows user.

    I am able to connect to SQL using SSMS via SQL user "test".

    But I am unable to connect to SQL using application SQL connection string.

    SQL server is part of Active Directory and it is on-premise server. 

    WEB server is Microsoft Azure VM and it on workgroup.

    I want to connect to SQL server using application connection string via SQL user "test" from web server.

    This is SQL always on high availability group name "SQLTEST".

    QLTEST is AG listener with correct ip and it is listing on port 1433.


    ABDUL HAFEEZ MCSE MCITP

    • Moved by John Qiao Wednesday, September 23, 2015 2:39 AM
    Saturday, September 19, 2015 4:54 AM

All replies

  • Hi ABDUL,

    Thanks for your post.

    Are you using TFS? If yes, what’s the version of your TFS?

    It seems this issue relate Azure, I think you should post it in Cloud Services forum for the better response.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Monday, September 21, 2015 7:05 AM
  • I am not using TFS.

    Microsft azure simple virtual machine with IIS role installed, SQL server ia part of AD and it is on-premises.

    I am able to connect using SSMS but not from web application via connection string.


    ABDUL HAFEEZ MCSE MCITP

    Tuesday, September 22, 2015 5:13 AM