Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
I set up the trusted connection string in my web.config file:
[php]
<appSettings>
<add key="SQL_NT"
value="Provider=SQLOLEDB; Data Source=sql-server;
Initial Catalog=Test_database; Integrated Security=SSPI; Trusted_Connection=yes;" />
</appSettings>
[/php]
I then call it in my app_code class as follows:
[php]
OleDbConnection conn = new OleDbConnection(System.Configuration.ConfigurationManager.AppSettings.Get("SQL_NT"));
conn.Open();
[/php]
The conn.Open() generates the authentication failure. This same string was working yesterday. As part of hte previous fix, I went into the IIS admin and change directory security to authenticate anonymous users as my domain login.
The problem is I don't control the domain and I don't control the SQL server. If I controlled the SQL server, I'd just allow mixed logins and use SQL authentication. I don't know if something was changed on my domain llogin that suddenly broke this authentication. It's very frustrating as it's frozen my web development in its tracks.
I'm currently tracking down ASP.NET event log errors in the hope I'll find a root cause.Statistics: Posted by Satis — Thu Oct 12, 2006 6:54 am
]]>