I’m trying to connect a .NET Framework 4.0 WCF REST service on an IIS6 to a SQL Server 2008 R2 database with this connection string:
<add name="EReportEntities"
connectionString="metadata=res://*/EReportModel.csdl|res://*/EReportModel.ssdl|res://*/EReportModel.msl;provider=System.Data.SqlClient;provider connection string="Server=localhost;Database=ADM;User Id=sa;Password=XXXXXXXX;multipleactiveresultsets=True;App=EntityFramework""
providerName="System.Data.EntityClient" />
But I can’t. I get:
Event Type: Failure Audit
Event Source: MSSQLSERVER
Event Category: (4)
Event ID: 18456
Date: 10/19/2012
Time: 10:47:48 AM
User: N/A
Computer: UNILEVER
Description:
Login failed for user 'sa'. [CLIENT: <local machine>]
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 18 48 00 00 0e 00 00 00 .H......
0008: 09 00 00 00 55 00 4e 00 ....U.N.
0010: 49 00 4c 00 45 00 56 00 I.L.E.V.
0018: 45 00 52 00 00 00 07 00 E.R.....
0020: 00 00 6d 00 61 00 73 00 ..m.a.s.
0028: 74 00 65 00 72 00 00 00 t.e.r...
But, if I use sa user to login on SQL Server Management Studio I can login.
What am I doing wrong?
try use other connection string variant at http://www.connectionstrings.com/sql-server-2008