further observations - connecting to sql server 2005 express
Hi
Thought I would add some info as I have finally (after a couple of hours or so !) connected to the database within a VPS hosting package.
The connection string is difficult to master as there are so many different options. You don't need to have it in the Web.config by the way - you can manually define the connection string when setting up the sqlconnection object.
The first post in this thread mentions that you must have a connection string with "user instance=true" in it. But this is not supported in ASP.NET (or at least not my version 1.1). I dispensed with it. Basically, after cutting out some other bits I didn't need, I found this worked:
data Source=(servername)\SQLEXPRESS ; Integrated Security=True ; Initial Catalog=(database name)
obviously with the database name and servername set to their respective values.
This does not need impersonation switched on, by the way, and authentication mode is set to "None" in the web config.
Hope this helps someone else save 2 hours or more in their working day!
Cheers
Tyrone
|