By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,575 Members | 1,948 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,575 IT Pros & Developers. It's quick & easy.

not associated with trusted SQL Server problem - windows service

P: n/a
I'm getting Not associated with a trusted SQL Server connection
errors on a .Net windows service I wrote, when it's running on my
application server.

It's not a problem with mixed mode security. I'm set for mixed mode and
I've been running the service on the app server for over a month with
no problem. My database is running on a second server and both are
under the same domain.

The problem has occurred twice over the last two months.

The windows service queries a table every 30 seconds, looking for
records to process. It's using a connection string and the user id is
setup and working in SQL. That when it's generating the error.

I've changed the connection string user id to sa and I still get the
problem. (server=xxx;database=yyy;user=sa;pwd=xyz)

The windows service is running under the domain/Administrator account.

I can run the windows service from a workstation with no problem. But
when I start it up on the application server, I get the 'not
associated' error back from Sql Server.

I'm trying to figure out where the problem is, and why it's
intermittent. Is it rights, policy, security? Why does it work for a
while then then error out?
Any suggestions or help is appreciated.

Thanks,
Eric

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
epaetz (ep******@hotmail.com) writes:
I'm getting Not associated with a trusted SQL Server connection
errors on a .Net windows service I wrote, when it's running on my
application server.

It's not a problem with mixed mode security. I'm set for mixed mode and
I've been running the service on the app server for over a month with
no problem. My database is running on a second server and both are
under the same domain.

The problem has occurred twice over the last two months.

The windows service queries a table every 30 seconds, looking for
records to process. It's using a connection string and the user id is
setup and working in SQL. That when it's generating the error.

I've changed the connection string user id to sa and I still get the
problem. (server=xxx;database=yyy;user=sa;pwd=xyz)


Well, if you get that error when you proivde user id/password, that
usually means that SQL Server is configured for Windows authentication
only.

What happans if you change the connection string to use integrated
security?

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

P: n/a
> Well, if you get that error when you proivde user id/password, that
usually means that SQL Server is configured for Windows authentication only.
We've been configured for mixed security since we became operational,
over 2 years ago. As I mentioned above, the service was running fine
until yesterday morning. I restarted the service this morning and now
it's running. So the problem is intermittent. I'm wondering if there's
an issue with mdac versions between my server and my development
platform.
What happans if you change the connection string to use integrated
security? I've just done that. Before I did that, I restarted the service on the
server, and now it's working fine. I installed and started the updated
service that uses integrated security (Integrated Security=SSPI).

It's running with the integrated security for now. But I'm assuming
that the problem will crop up again. I've seen references in this
newsgroup to connections with Integrated Security bombing out under the
same circumstances.

Thanks,
Eric
Erland Sommarskog wrote: epaetz (ep******@hotmail.com) writes:
I'm getting Not associated with a trusted SQL Server connection
errors on a .Net windows service I wrote, when it's running on my
application server.

It's not a problem with mixed mode security. I'm set for mixed mode and I've been running the service on the app server for over a month with no problem. My database is running on a second server and both are
under the same domain.

The problem has occurred twice over the last two months.

The windows service queries a table every 30 seconds, looking for
records to process. It's using a connection string and the user id is setup and working in SQL. That when it's generating the error.

I've changed the connection string user id to sa and I still get the problem. (server=xxx;database=yyy;user=sa;pwd=xyz)
Well, if you get that error when you proivde user id/password, that
usually means that SQL Server is configured for Windows

authentication only.

What happans if you change the connection string to use integrated
security?

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp


Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.