Mark Conway

Mark Conway

  • NA
  • 10
  • 16.5k

SQL Server Integrated Security ConnectionString not using my domain credentials

Dec 29 2010 6:22 AM
Hi there,

I have the following connection string:
 <connectionStrings>
<add name="DBConnectionString" connectionString="Server=ASEGH-SQL-T09\BackOffice;Integrated Security=SSPI;database=AsosBackOffice;" providerName="System.Data.SqlClient"/>
</connectionStrings>



However when my ASP.NET page tries to connect to the database it gets a LogIn failure because it is not using the user account that I have logged into windows with.

This is the stack trace of the error:
 .......
.......
BusinessObjects.ProjException: ASP.usercontrols_receipt_ctlreceiptlist_ascx.RenderMe ---> BusinessObjects.ProjException: ASP.usercontrols_receipt_ctlreceiptlist_ascx.PopulatePageData ---> BusinessObjects.ProjException: ASP.usercontrols_receipt_ctlreceiptlist_ascx.dgReceipts_ItemDataBound ---> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Login failed for user 'ASSEENONSCREEN\WS-09G-05QFF$'. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Data.SqlClient.SqlException: Login failed for user 'ASSEENONSCREEN\WS-09G-05QFF$'.
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, 
.....
.....


It should attempt to log in with ASSEENONSCREEN\MarkC, this is the user I am logged on to windows with and hosting my IIS website with. I guess I dont fully understand how SQL Server Integrated Security works :S

Please help me on this one! 

Thanks in advance,

Mark.

Answers (4)