Sairam Soham

Sairam Soham

  • NA
  • 47
  • 27.1k

SqlException: The login is from an untrusted domain and cann

Jun 16 2015 6:15 PM

I have the following DB connection string in App.config

<add name="Host"
          connectionString="Data Source=D-IA-DB;User ID=VailidUserID;password=ValidPassword;Initial Catalog=Databasename;Integrated Security=True;Trusted_Connection=True;"
          providerName="System.Data.SqlClient" />

I put the correct value for user ID, password and Initial Catalog.

But I got the following exception.

Any thought what might be missing?


"System.Data.SqlClient.SqlException (0x80131904): Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.\r\n   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)\r\n   at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)\r\n   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo,


Answers (2)