473,387 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

SQL Server Trusted Connection

I'm trying to get my program to connect to a SQL Server 2005 database over the internet.
The remote computer is on another network and it's connected to our network through Windows VPN. I'm running Windows Small Business Server 2005 on our server with SQL Server 2005 and ISA Server 2004.

I can do this at home with my laptop using the following connection string:

strCnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;" & "User ID=" & _
sysUser & ";Initial Catalog=" & sysDatabase & ";Data Source=" & sysServer & ";"
db.CursorLocation = ADODB.CursorLocationEnum.adUseClient
db.Open(strCnn)

I'm using the local IP address of the server as 'sysServer' - 192.168.1.2
But my laptop has Visual Studio 2008 and SQL Server Express on it.

When I try to do it from this other remote computer, I get:

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

SQL Server is set on Windows authentication and I'd rather not have to change that. I don't want the users to have to use their Windows password to get into my program.

What do I need to change to get this to work?
Oct 21 '08 #1
3 6614

What domain is the Server on?
Has the laptop (machine) been added to the domain?
What login are you using on the laptop computer?
........(and repeat the question for the "other remote")
Has the (other remote computer)(machine) been added to the domain?
What login are you using on the (other remote computer) computer?

"Kevinp" <ke****@nospam.comwrote in message
news:s7********************************@4ax.com...
I'm trying to get my program to connect to a SQL Server 2005 database over
the internet.
The remote computer is on another network and it's connected to our
network through Windows VPN. I'm running Windows Small Business Server
2005 on our server with SQL Server 2005 and ISA Server 2004.

I can do this at home with my laptop using the following connection
string:

strCnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;" & "User ID=" & _
sysUser & ";Initial Catalog=" & sysDatabase & ";Data Source=" &
sysServer & ";"
db.CursorLocation = ADODB.CursorLocationEnum.adUseClient
db.Open(strCnn)

I'm using the local IP address of the server as 'sysServer' - 192.168.1.2
But my laptop has Visual Studio 2008 and SQL Server Express on it.

When I try to do it from this other remote computer, I get:

Login failed for user ''. The user is not associated with a trusted SQL
Server connection.

SQL Server is set on Windows authentication and I'd rather not have to
change that. I don't want the users to have to use their Windows password
to get into my program.

What do I need to change to get this to work?

Oct 21 '08 #2
The server is on the domain here at our office. My laptop has not been assigned to any domain. It's actually part of my home workgroup, but it has been connected to the domain at the office. The computer I'm trying to connect with is on a completely
different domain and has never been a part of our domain except for VPN.

I use the same username and password on my laptop as I do with my office computer (obviously the domains are not the same). The remote computer uses a completely different username/password/domain.
On Tue, 21 Oct 2008 15:35:57 -0400, "sloan" <sl***@ipass.netwrote:
>
What domain is the Server on?
Has the laptop (machine) been added to the domain?
What login are you using on the laptop computer?
.......(and repeat the question for the "other remote")
Has the (other remote computer)(machine) been added to the domain?
What login are you using on the (other remote computer) computer?

"Kevinp" <ke****@nospam.comwrote in message
news:s7********************************@4ax.com.. .
>I'm trying to get my program to connect to a SQL Server 2005 database over
the internet.
The remote computer is on another network and it's connected to our
network through Windows VPN. I'm running Windows Small Business Server
2005 on our server with SQL Server 2005 and ISA Server 2004.

I can do this at home with my laptop using the following connection
string:

strCnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;" & "User ID=" & _
sysUser & ";Initial Catalog=" & sysDatabase & ";Data Source=" &
sysServer & ";"
db.CursorLocation = ADODB.CursorLocationEnum.adUseClient
db.Open(strCnn)

I'm using the local IP address of the server as 'sysServer' - 192.168.1.2
But my laptop has Visual Studio 2008 and SQL Server Express on it.

When I try to do it from this other remote computer, I get:

Login failed for user ''. The user is not associated with a trusted SQL
Server connection.

SQL Server is set on Windows authentication and I'd rather not have to
change that. I don't want the users to have to use their Windows password
to get into my program.

What do I need to change to get this to work?
Oct 22 '08 #3
//The remote computer uses a completely different
username/password/domain.//

Then I don't think you can use integrated security with this and will have
to go to mixed authentication.

This happens to me when I "go on the road" with my personal laptop for work
stuff.
Because my personal laptop isn't on the domain, I have to have the dba's
create a sql authenication account for me, with lots of right of course.

..............

Basically, if you go through the "Security/Login" in Sql Server........and
hit the "Browse" button (for usernames on the domain), and you can't see
the user logged into Laptop1 (in your scenario)...then trusted isn't going
to work.
................
Security / Logins / New Login ................... Windows Authentication /
Search.

If you don't find it in there, then you can't use Integrated. If you do
find it in there, you have to ADD the user...and assign privs.


"Kevinp" <ke****@nospam.comwrote in message
news:3m********************************@4ax.com...
The server is on the domain here at our office. My laptop has not been
assigned to any domain. It's actually part of my home workgroup, but it
has been connected to the domain at the office. The computer I'm trying to
connect with is on a completely
different domain and has never been a part of our domain except for VPN.

I use the same username and password on my laptop as I do with my office
computer (obviously the domains are not the same). The remote computer
uses a completely different username/password/domain.
On Tue, 21 Oct 2008 15:35:57 -0400, "sloan" <sl***@ipass.netwrote:
>>
What domain is the Server on?
Has the laptop (machine) been added to the domain?
What login are you using on the laptop computer?
.......(and repeat the question for the "other remote")
Has the (other remote computer)(machine) been added to the domain?
What login are you using on the (other remote computer) computer?

"Kevinp" <ke****@nospam.comwrote in message
news:s7********************************@4ax.com. ..
>>I'm trying to get my program to connect to a SQL Server 2005 database
over
the internet.
The remote computer is on another network and it's connected to our
network through Windows VPN. I'm running Windows Small Business Server
2005 on our server with SQL Server 2005 and ISA Server 2004.

I can do this at home with my laptop using the following connection
string:

strCnn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;" & "User ID=" & _
sysUser & ";Initial Catalog=" & sysDatabase & ";Data Source=" &
sysServer & ";"
db.CursorLocation = ADODB.CursorLocationEnum.adUseClient
db.Open(strCnn)

I'm using the local IP address of the server as 'sysServer' -
192.168.1.2
But my laptop has Visual Studio 2008 and SQL Server Express on it.

When I try to do it from this other remote computer, I get:

Login failed for user ''. The user is not associated with a trusted SQL
Server connection.

SQL Server is set on Windows authentication and I'd rather not have to
change that. I don't want the users to have to use their Windows
password
to get into my program.

What do I need to change to get this to work?

Oct 22 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: DMS | last post by:
am new to ASP.NET and IIS web applications, but not to SQL databases. I can successfully build Windows apps using Visual Studio that use ADO. However, for Web Forms, I created data connection and...
2
by: Blake Versiga | last post by:
I am pulling my hair out..... I am trying to put a bound data grid on a webform... I have 4 data connections in my server explorer, all of which connect successfully. But when I run the web...
7
by: Ray Valenti | last post by:
I am able to preview this data in the development environment, but when I run the application the error below shows up. How do I set up a Trusted Connection? -Ray Server Error in...
3
by: Bobofrut | last post by:
Hi I have a problem, when I try to connect to the MS SQL SERVER from my workstation ocourr the error message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server...
4
by: Brent Waldrop | last post by:
Ok everyone, i have been pulling my hair out on this one. I have been working on it for 3 days with no sucess. This problem is occuring at home where i am running a workgroup. I have Windows 2003...
12
by: RKay | last post by:
I have a Win2k server running SQL Server 2000. On that box I built a working web service that pulls data from the database. One of the services available simply accepts an ado.net connection string...
22
by: Bob and Sharon Hiller | last post by:
I have an ASP page that was done in VBScript It is setup to read an Access database and I need to change it to read a Sql 2005 Database. The code that is used to open the Access Database: Set...
1
by: Chris | last post by:
hi I have big problem. I am writing a small win application. It will work on remote MS SQL database (2005). Firstly, I need to log on to the server. The server supports remote connections and sql...
3
by: tc | last post by:
Does anyone have an example of how to connect to an SQL server and create a new database, then add a user and assign permissions? One problem is that users may be user authenticated, not Windows...
4
by: eruth | last post by:
There are loads of post on this, but nothing that seems to cover my exact problem ;) I have an ASP.Net 1.1 web application running on my local machine. I want to connect to an SQL 2005 server...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.