not associated with trusted SQL Server problem - windows service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • epaetz

    not associated with trusted SQL Server problem - windows service

    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;dat abase=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

  • Erland Sommarskog

    #2
    Re: not associated with trusted SQL Server problem - windows service

    epaetz (epaetz41@hotma il.com) writes:[color=blue]
    > 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;dat abase=yyy;user= sa;pwd=xyz)[/color]

    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, esquel@sommarsk og.se

    Books Online for SQL Server SP3 at
    Accelerate your AI application's time to market by harnessing the power of your own data and the built-in AI capabilities of SQL Server 2025, the enterprise database with best-in-class security, performance and availability.

    Comment

    • epaetz

      #3
      Re: not associated with trusted SQL Server problem - windows service

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

      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.
      [color=blue]
      > What happans if you change the connection string to use integrated
      > security?[/color]
      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:[color=blue]
      > epaetz (epaetz41@hotma il.com) writes:[color=green]
      > > 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[/color][/color]
      and[color=blue][color=green]
      > > I've been running the service on the app server for over a month[/color][/color]
      with[color=blue][color=green]
      > > 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[/color][/color]
      is[color=blue][color=green]
      > > 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[/color][/color]
      the[color=blue][color=green]
      > > problem. (server=xxx;dat abase=yyy;user= sa;pwd=xyz)[/color]
      >
      > Well, if you get that error when you proivde user id/password, that
      > usually means that SQL Server is configured for Windows[/color]
      authentication[color=blue]
      > only.
      >
      > What happans if you change the connection string to use integrated
      > security?
      >
      >
      >
      > --
      > Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se
      >
      > Books Online for SQL Server SP3 at
      > http://www.microsoft.com/sql/techinf...2000/books.asp[/color]

      Comment

      Working...