Web Service Authentication Error with SQL Server

  • Thread starter Thread starter jgeisler
  • Start date Start date
J

jgeisler

Hi,

I'm building my first web service, and I'm having trouble getting into
my local database with the following connectionstring:

Dim myConnection As New SqlConnection("Persist Security Info" & _
"=False;Data Source=Green15;Initial
Catalog=Green15\ZipCode;" & _
"Integrated Security=True;")

The error that I receive is the following:

System.Data.SqlClient.SqlException: Cannot open database
"Green15\ZipCode" requested by the login. The login failed.
Login failed for user 'GREEN15\jgeisler'.

That is the login that I use to connect to that server from SQL Server
Management Studio, and I've definitely added the user
'GREEN15\jgeisler' to the list of SQL Server Users, but still get this
error.

Any help would be appreciated...

John
 
I can duplicate the same error message if I put the SQL Server instance and
a slash in front of my target database in the Initial Catalog setting in the
connection string. Therefore perhaps set your

Initial Catalog=ZipCode;

and see what happens.

Reece
 
Back
Top