By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,587 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,587 IT Pros & Developers. It's quick & easy.

SQL Server 2005 Express Edition login problem when deploying a windows application

P: n/a
Hi there

The scenario I got is this: I have created a Windows application in VS and I
want to deploy it to another machine running Windows Vista. Since I have no
control over this other machine, I've set it up to run SQL Authentication
and I have added a new user called "MyUser" and applied a password. This
user/password is used in my connection string whick looks like this:

Server=.\SQLEXPRESS;Database=MyDB;User ID=MyUser;Password=thissucks

I've created a setup project in which the database is included. On my
machine (Windows XP SP2) the setup runs without problems and I can use my
app and database connection without any errors. On the Vista machine, the
other user gets this error:

"Login failed for user "MyUser". The user is not associated with a thrusted
server connection".

I've read a bunch of suggested solutions on the net, none of which has
provided a solution...yet.

How do you create a deployment/Publish in VS when using SQL Server 2005
Express Edition, when the maching it's supposed to be installed on only has
..NET FrameWork? I can't seem to get it to work...

TIA

PZ
May 15 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"Preben Zacho" <po**@zacho-web.dkwrote in message
news:eM**************@TK2MSFTNGP03.phx.gbl...
Hi there

The scenario I got is this: I have created a Windows application in VS and
I want to deploy it to another machine running Windows Vista. Since I have
no control over this other machine, I've set it up to run SQL
Authentication and I have added a new user called "MyUser" and applied a
password. This user/password is used in my connection string whick looks
like this:

Server=.\SQLEXPRESS;Database=MyDB;User ID=MyUser;Password=thissucks

I've created a setup project in which the database is included. On my
machine (Windows XP SP2) the setup runs without problems and I can use my
app and database connection without any errors. On the Vista machine, the
other user gets this error:
Maybe, you're using your user-id and psw and SQL Server is set to Windows
authentication. Your user ID is trusted as part of the machine's logon
user-id.
>
"Login failed for user "MyUser". The user is not associated with a
thrusted server connection".
The user-id is not a trusted Windows User Id.
>
I've read a bunch of suggested solutions on the net, none of which has
provided a solution...yet.

How do you create a deployment/Publish in VS when using SQL Server 2005
Express Edition, when the maching it's supposed to be installed on only
has .NET FrameWork? I can't seem to get it to work...
http://support.microsoft.com/kb/889615

You may want to set SQL Server Authentication to Mixed Mode Authentication,
which is Windows or SQL Server User-id and psw authentication, if it's not
set.
May 16 '07 #2

P: n/a
Hi Arnold
Maybe, you're using your user-id and psw and SQL Server is set to Windows
authentication. Your user ID is trusted as part of the machine's logon
user-id.
I'm using the user I've created in the database scope which is called
"MyUser" and password "thissucks". I assume, when SQL Authentication is
used, the user specified in the connection string is matched against the one
in the database and not a Windows user.
The user-id is not a trusted Windows User Id.
That's what I'm looking for. User "MyUser" is NOT a windows user, so I don't
understand why it wants to authenticate it like it is.
You may want to set SQL Server Authentication to Mixed Mode
Authentication, which is Windows or SQL Server User-id and psw
authentication, if it's not set.
In the SQL Server Management Studio Express I have already marked the "SQL
Server and Windows authentication mode" under server/options/security. If
there is anywhere else this should be set, please let me know.

Any other recommendations?

/PZ

"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:OA****************@TK2MSFTNGP05.phx.gbl...
>
"Preben Zacho" <po**@zacho-web.dkwrote in message
news:eM**************@TK2MSFTNGP03.phx.gbl...
>Hi there

The scenario I got is this: I have created a Windows application in VS
and I want to deploy it to another machine running Windows Vista. Since I
have no control over this other machine, I've set it up to run SQL
Authentication and I have added a new user called "MyUser" and applied a
password. This user/password is used in my connection string whick looks
like this:

Server=.\SQLEXPRESS;Database=MyDB;User ID=MyUser;Password=thissucks

I've created a setup project in which the database is included. On my
machine (Windows XP SP2) the setup runs without problems and I can use my
app and database connection without any errors. On the Vista machine, the
other user gets this error:

Maybe, you're using your user-id and psw and SQL Server is set to Windows
authentication. Your user ID is trusted as part of the machine's logon
user-id.
>>
"Login failed for user "MyUser". The user is not associated with a
thrusted server connection".

The user-id is not a trusted Windows User Id.
>>
I've read a bunch of suggested solutions on the net, none of which has
provided a solution...yet.

How do you create a deployment/Publish in VS when using SQL Server 2005
Express Edition, when the maching it's supposed to be installed on only
has .NET FrameWork? I can't seem to get it to work...

http://support.microsoft.com/kb/889615

You may want to set SQL Server Authentication to Mixed Mode
Authentication, which is Windows or SQL Server User-id and psw
authentication, if it's not set.


May 16 '07 #3

P: n/a
<snipped>
>
Any other recommendations?

You might want to post to a MS.public.sqlserver NG to see if they may know
something about the issue.

May 16 '07 #4

P: n/a
Ok thanks Arnold. I'll give it a try.

All I want is to deploy my app and database without having to care about
user authority and stuff. If possible, I would deploy my database without
any login restrictions so it would run no matter who you were, but I assume
that is not possible:

/PZ

"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:eq**************@TK2MSFTNGP06.phx.gbl...
<snipped>
>>
Any other recommendations?


You might want to post to a MS.public.sqlserver NG to see if they may know
something about the issue.

May 16 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.