Well, the SA password version is simply wrong. It's wrong in any number =
of ways--these are but a few:
a.. Developers should not use the SA account for their applications. =
It leads to a host of other issues and masks the need to manage =
connection security correctly. The fact that this course teaches them to =
do so is... not good.
b.. SQL Server does not permit logging in via username/password (SQL =
Server Authentication) by default. It must be enabled.
c.. If you have installed SQL Server, it must be reconfigured to =
support SQL Server authentication and to have the SA password set to the =
right value.
d.. SS Authentication is not wrong in of itself but it needs to be =
preconfigured on the server.=20
hth
--=20
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva www.betav.com Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no =
rights.
__________________________________
Visit
www.hitchhikerguides.net to get more information on my latest =
book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-------------------------------------------------------------------------=
----------------------------------------------
"michael sorens" <michaelsorens@discussions.microsoft.com> wrote in =
message news:988C6CC7-AD4D-4AF0-B424-DC77B91D2959@microsoft.com...
[quoted text, click to view] >I am working through the manual for course 2524 (Developing XML web =
services=20
> using ASP.NET). It is at least 4 years old so hopeless outdated (:-) =
but I=20
> think I can salvage it to still be useful. I actually tried this with =
just=20
> the express editions of visual web developer, C#, and sql server 2005. =
I=20
> loaded the demo web service project (Woodgrove) and launced it via the =
> internal web server in visual web developer. I was successful in =
getting the=20
> services page to the web service but ran into a problem when I tried =
to=20
> execute a web method that accessed the service's database. The exact =
error=20
> was:=20
>=20
> "System.Data.SqlClient.SqlException: An error has occurred while=20
> establishing a connection to the server. When connecting to SQL Server =
2005,=20
> this failure may be caused by the fact that under the default settings =
SQL=20
> Server does not allow remote connections. (provider: SQL Network =
Interfaces,=20
> error: 26 - Error Locating Server/Instance Specified)"=20
>=20
> After winding down the path of that error (enabling remote =
connections,=20
> enabling the sql server browser, and adding exceptions in the firewall =
for=20
> sql server and sql server browser) I finally realized that that was =
not the=20
> problem at all. The issue was the connection string in the demo =
project. The=20
> original was:=20
>=20
> data source=3D.\MOC;initial catalog=3DWoodgrove;user =
id=3Dsa;pwd=3DCourse_2524=20
>=20
> But attempting to connect to this as a datasource with the "sa" login =
failed=20
> (though I did setup my sql server to accept either sql or windows=20
> authentication).=20
>=20
> I achieved a successful connection with this connection string:=20
>=20
> Data Source=3D.\SQLEXPRESS;AttachDbFilename=3D"C:\Program=20
> Files\Msdntrain\2524\Database\Woodgrove_Data.MDF";Integrated=20
> Security=3DTrue;Connect Timeout=3D30;User Instance=3DTrue=20
>=20
> So I solved my problem. The purpose of this post, then, is to see if =
someone=20
> could enlighten me on the differences between these two connection =
strings=20
> including, but not limited to, these:=20
> Why did the original use a different data source? Why did the original =
not=20
> name a specific file, but instead named a catalog? Are the other =
parameters=20
> in the second string new with VS2005 but now needed?=20