Re: Windows Service Login Failed when accessing SQL.

From: Sam Santiago (ssantiago_at_n0spam-SoftiTechture.com)
Date: 11/02/04


Date: Tue, 2 Nov 2004 11:06:43 -0800

SQL Authentication should work since you specify the login ID and password
in the connection string. Create a user (other than sa) on SQL Server that
explicitly is set to use SQL Authentication, not Windows auth, and try that
user from your application. Also, test outside the application that you can
connect to the SQL Server DB successfully. If that fails, post some code
and a stack trace since that might provide more insight.

Thanks,

Sam

-- 
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
"Evan Camilleri" <evan@holistic.com.mt.nospam> wrote in message
news:%23PUvTFQwEHA.1292@TK2MSFTNGP10.phx.gbl...
> Windows Service Login Failed when accessing SQL.
>
> I have a problem for a Windows Service to login on an SQL server
(different
> machine) - neither Windows Authentication nor SQL Authentication worked.
> LOGIN FAILED FOR USER sa (for example).
>
> If SQL Server is on the same PC of the Windows Service the connection
works
> OK.
>
> The same code works in a Windows Form using same user and authentication
> methods to the SQL Server on a different machine.
>
> Thanks for any help!
>
> Evan Camilleri
>
>


Relevant Pages

  • More on Connection Exception with Windows Service...!
    ... I am getting a connection exception when trying to access an SQL Server ... DOES NOT WORK: Windows SERVICE ... open database requested in login 'CRM'. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connect to Desktop SQL Server 2000 from Pocket PC
    ... SSPI is in fact supported, but you have to provide user ID and password ... This might be useful if SQL authentication is disabled on a server. ... > Xref: cpmsftngxa10.phx.gbl ... >> I need to connect from a program in the Pocket PC to SQL Server in my ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Problems connecting to SQL-Server
    ... Using a single SQL Server auth login for 200 users is not very secure. ... > Is there a difference in connection speed with NT and SQL authentication? ...
    (microsoft.public.sqlserver.connect)
  • Re: Reason: Not associated with a trusted SQL Server connection.
    ... Are you sure SQL Server is set up to use both SQL Authentication and Windows ... "John Beschler" wrote in message ... > I don't think it's a problem with the IUSR account because ASP runs fine. ...
    (microsoft.public.inetserver.asp.db)
  • Problem Connecting to another SQL DB using SQL Security
    ... I am attempting to create a Data Source connection to a SQL Server DB using ... SQL Authentication so that I can create DataViews and cannot (I get "Server ...
    (microsoft.public.sharepoint.windowsservices)