|
 |
aspx thread: [OOT] SQL Server Connection
Message #1 by "duck" <bjs52@t...> on Fri, 1 Jan 1999 00:19:27 +0700
|
|
Hi, Guys.
i need your help.
i'm new in MSSQL.
i have got an error message, when i'm trying make a connection between
server and client for MSSQL2000.
the server is using Win XP Prof and the client is using Win 98, and the
network has already connected.
the error message is like this :
" Login failed for user 'ENDIE\Guest' Reason : Not Associated with trusted
SQl Server Connection "
can anyone tell me, what should i do ?
thanks in Advance.
regards
M. Yadi M.
--------------------------- Yang Mudah dan Menghibur ---------------------------------
Hosting menjadi mudah dan murah hanya di PlasaCom. Klik http://idc.plasa.com
F1 Mania!! Ikuti F1 Game di Obelix Game Corner di http://www.plasa.com/infotel/f1.html
---------------------------------------------------------------------------------------
Message #2 by "Graham Dobson" <grahamdo@a...> on Thu, 8 Aug 2002 23:13:26 -0400
|
|
Have you set up application roles and permissions? Are you using SQL
Servers Login and user security? Also a good idea to set the default
database.....
Graham
-----Original Message-----
From: duck [mailto:bjs52@t...]
Sent: Thursday, December 31, 1998 12:19 PM
To: ASP+
Subject: [aspx] [OOT] SQL Server Connection
Hi, Guys.
i need your help.
i'm new in MSSQL.
i have got an error message, when i'm trying make a connection between
server and client for MSSQL2000.
the server is using Win XP Prof and the client is using Win 98, and the
network has already connected.
the error message is like this :
" Login failed for user 'ENDIE\Guest' Reason : Not Associated with trusted
SQl Server Connection "
can anyone tell me, what should i do ?
thanks in Advance.
regards
M. Yadi M.
--------------------------- Yang Mudah dan
Menghibur ---------------------------------
Hosting menjadi mudah dan murah hanya di PlasaCom. Klik
http://idc.plasa.com
F1 Mania!! Ikuti F1 Game di Obelix Game Corner di
http://www.plasa.com/infotel/f1.html
---------------------------------------------------------------------------
------------
Message #3 by "Rich K" <rich@r...> on Thu, 8 Aug 2002 23:14:47 -0400
|
|
check out this link. I used method 3 to resolve this issue.
http://support.microsoft.com/default.aspx?scid=KB;EN-US;q229286&
-----Original Message-----
From: duck [mailto:bjs52@t...]
Sent: Thursday, December 31, 1998 12:19 PM
To: ASP+
Subject: [aspx] [OOT] SQL Server Connection
Hi, Guys.
i need your help.
i'm new in MSSQL.
i have got an error message, when i'm trying make a connection between
server and client for MSSQL2000.
the server is using Win XP Prof and the client is using Win 98, and the
network has already connected.
the error message is like this :
" Login failed for user 'ENDIE\Guest' Reason : Not Associated with trusted
SQl Server Connection "
can anyone tell me, what should i do ?
thanks in Advance.
regards
M. Yadi M.
--------------------------- Yang Mudah dan
Menghibur ---------------------------------
Hosting menjadi mudah dan murah hanya di PlasaCom. Klik
http://idc.plasa.com
F1 Mania!! Ikuti F1 Game di Obelix Game Corner di
http://www.plasa.com/infotel/f1.html
---------------------------------------------------------------------------
------------
Message #4 by "David Adames" <david@p...> on Thu, 8 Aug 2002 23:16:41 -0400
|
|
Yang ,
The following was sent to me by Rich K. I haven't had time to try it yet.
Let us know if it works...
The trusted sql connection can be resolved in the following manner:
1.Create a new user account on both the SQL machine and IIS machine.
(Make sure the user name and password are identical on both machines)
2.Add this new user in the security accounts of SQL Server and give the user
access to the db you are trying to connect to. (I wouldn't recommend not
using the sa account.)
3.Open the machine.config file and search for the following string
"<processModel"
Set the username and password attributes of the "processModel" to this new
account you created.
4.Edit the account IIS uses to run under. Add the new user to the account
you created and make sure to enter the accounts password. Don't let IIS
manage the account password. (This is under Directory Security in IIS)
Make sure this new user also has directory permissions to the website
directory files.
You will need to reboot both machines after all the changes are made.
There is a microsoft tech article on the trusted sql connection problem, but
I can't find it. I have had the same problem with asp and asp.net. I
basically summed up how to resolve the connection problem with steps 1,2 and
4. Steps 3 is to set the asp.net application to use the new account.
the sql connection string will then look like this:
string Conn = "Initial Catalog=DBName;Data Source=ServerName;Integrated
Security=SSPI;";
I hope this helps.
Rich.
-----Original Message-----
From: duck [mailto:bjs52@t...]
Sent: Thursday, December 31, 1998 12:19 PM
To: ASP+
Subject: [aspx] [OOT] SQL Server Connection
Hi, Guys.
i need your help.
i'm new in MSSQL.
i have got an error message, when i'm trying make a connection between
server and client for MSSQL2000.
the server is using Win XP Prof and the client is using Win 98, and the
network has already connected.
the error message is like this :
" Login failed for user 'ENDIE\Guest' Reason : Not Associated with trusted
SQl Server Connection "
can anyone tell me, what should i do ?
thanks in Advance.
regards
M. Yadi M.
--------------------------- Yang Mudah dan
Menghibur ---------------------------------
Hosting menjadi mudah dan murah hanya di PlasaCom. Klik
http://idc.plasa.com
F1 Mania!! Ikuti F1 Game di Obelix Game Corner di
http://www.plasa.com/infotel/f1.html
---------------------------------------------------------------------------
------------
Message #5 by <norman_lm_fung@h...> on Fri, 9 Aug 2002 01:31:24 -0400
|
|
hi, what do u mean when u said "Don't let IIS
manage the account password. (This is under Directory Security in IIS)"??
thanx!
norm
----- Original Message -----
From: "David Adames" <david@p...>
To: "ASP+" <aspx@p...>
Sent: Thursday, August 08, 2002 11:16 PM
Subject: [aspx] RE: [OOT] SQL Server Connection
> Yang ,
>
> The following was sent to me by Rich K. I haven't had time to try it yet.
> Let us know if it works...
>
> The trusted sql connection can be resolved in the following manner:
>
> 1.Create a new user account on both the SQL machine and IIS machine.
> (Make sure the user name and password are identical on both machines)
> 2.Add this new user in the security accounts of SQL Server and give the
user
> access to the db you are trying to connect to. (I wouldn't recommend not
> using the sa account.)
> 3.Open the machine.config file and search for the following string
> "<processModel"
> Set the username and password attributes of the "processModel" to this new
> account you created.
> 4.Edit the account IIS uses to run under. Add the new user to the account
> you created and make sure to enter the accounts password. Don't let IIS
> manage the account password. (This is under Directory Security in IIS)
>
> Make sure this new user also has directory permissions to the website
> directory files.
> You will need to reboot both machines after all the changes are made.
>
> There is a microsoft tech article on the trusted sql connection problem,
but
> I can't find it. I have had the same problem with asp and asp.net. I
> basically summed up how to resolve the connection problem with steps 1,2
and
> 4. Steps 3 is to set the asp.net application to use the new account.
>
> the sql connection string will then look like this:
> string Conn = "Initial Catalog=DBName;Data Source=ServerName;Integrated
> Security=SSPI;";
>
> I hope this helps.
> Rich.
>
> -----Original Message-----
> From: duck [mailto:bjs52@t...]
> Sent: Thursday, December 31, 1998 12:19 PM
> To: ASP+
> Subject: [aspx] [OOT] SQL Server Connection
>
>
> Hi, Guys.
>
> i need your help.
>
> i'm new in MSSQL.
> i have got an error message, when i'm trying make a connection between
> server and client for MSSQL2000.
> the server is using Win XP Prof and the client is using Win 98, and the
> network has already connected.
>
> the error message is like this :
> " Login failed for user 'ENDIE\Guest' Reason : Not Associated with trusted
> SQl Server Connection "
>
> can anyone tell me, what should i do ?
>
> thanks in Advance.
>
> regards
>
> M. Yadi M.
>
>
> --------------------------- Yang Mudah dan
> Menghibur ---------------------------------
> Hosting menjadi mudah dan murah hanya di PlasaCom. Klik
> http://idc.plasa.com
> F1 Mania!! Ikuti F1 Game di Obelix Game Corner di
> http://www.plasa.com/infotel/f1.html
> -------------------------------------------------------------------------
--
> ------------
>
>
>
>
>
>
Message #6 by "Rich K" <rich@r...> on Fri, 9 Aug 2002 02:56:00 -0400
|
|
norm and all,
let me clarify the problem and possible solution(s).
I am assuming that your connection code is correct and the problem is only a
security issue.
(connection not associated with a trusted connection)
There are a few ways to resolve this.
1. microsoft has mentioned this is a problem related to asp and connecting
to a sql db on a separate machine.
I also encountered the same problem with asp.net and sql server. (the
problem in this email)
Microsoft's first solution is to install sql on the same machine as IIS.
Great! Who the hell wants there db and iis to run on the same machine. that
solution sucks!
2. the second solution is to perform the following which i posted a few days
ago:
.............
1.Create a new user account on both the SQL machine and IIS machine.
> (Make sure the user name and password are identical on both machines)
> 2.Add this new user in the security accounts of SQL Server and give the
user
> access to the db you are trying to connect to. (I wouldn't recommend not
> using the sa account.)
> 3.Open the machine.config file and search for the following string
> "<processModel"
> Set the username and password attributes of the "processModel" to this new
> account you created.
> 4.Edit the account IIS uses to run under. Add the new user to the account
> you created and make sure to enter the accounts password. Don't let IIS
> manage the account password. (This is under Directory Security in IIS)
>
> Make sure this new user also has directory permissions to the website
> directory files.
> You will need to reboot both machines after all the changes are made.
>
> There is a microsoft tech article on the trusted sql connection problem,
but
> I can't find it. I have had the same problem with asp and asp.net. I
> basically summed up how to resolve the connection problem with steps 1,2
and
> 4. Steps 3 is to set the asp.net application to use the new account.
>
> the sql connection string will then look like this:
> string Conn = "Initial Catalog=DBName;Data Source=ServerName;Integrated
> Security=SSPI;";
................
after doing some reading about the impersonation account provided by asp.net
I found another way to resolve this problem.
The impersonation account allows ASP.net applications or pages to run under
another account
rather than the machine.config account which I believe all ASP.net
applications/pages run under.
If you have not changed the default account (ASPNET) is installed under you
can impersonate an account
to connect to sql server.
Here are the following steps:
1.create a new user on the web werver.
2. create a web.config file and add this file to the root of your web
directory.
3. add the following line between the <system.web> element
<identity impersonate="true" userName="[yourservername\newusername"
password="[enter new user names password]"/>
Example of web.config file:
<?xml version="1.0" encoding="utf-8" ?>
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<identity impersonate="true" userName="" password=""/>
</system.web>
</configuration>
4. create the same user name and password in the user account manager on
the sql server machine.
5. give this user access to the database you are connecting under security
accounts in sql server.
6. On your web server you must give this new user full control of the
C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files directory
and subfolders
7. reboot both machines.
side note:
norm, the reason I said to not check of the box in IIS to allow IIS to
control the username and password is because I ran
into a problem when I changed the password in user manager. IIS didn't
reflect the change. So I eventually had to go into IIS and reset the
password anyway. Atleast by just setting the password in IIS and telling IIS
not to **** with it I was sure that the user account password and the IIS
password I set would be the same. I hope this makes sense.
I hope this resolves your problems. If you guys have any more questions let
me know. Rich
-----Original Message-----
From: norman_lm_fung@h... [mailto:norman_lm_fung@h...]
Sent: Friday, August 09, 2002 1:31 AM
To: ASP+
Subject: [aspx] RE: [OOT] SQL Server Connection
hi, what do u mean when u said "Don't let IIS
manage the account password. (This is under Directory Security in IIS)"??
thanx!
norm
----- Original Message -----
From: "David Adames" <david@p...>
To: "ASP+" <aspx@p...>
Sent: Thursday, August 08, 2002 11:16 PM
Subject: [aspx] RE: [OOT] SQL Server Connection
> Yang ,
>
> The following was sent to me by Rich K. I haven't had time to try it yet.
> Let us know if it works...
>
> The trusted sql connection can be resolved in the following manner:
>
> 1.Create a new user account on both the SQL machine and IIS machine.
> (Make sure the user name and password are identical on both machines)
> 2.Add this new user in the security accounts of SQL Server and give the
user
> access to the db you are trying to connect to. (I wouldn't recommend not
> using the sa account.)
> 3.Open the machine.config file and search for the following string
> "<processModel"
> Set the username and password attributes of the "processModel" to this new
> account you created.
> 4.Edit the account IIS uses to run under. Add the new user to the account
> you created and make sure to enter the accounts password. Don't let IIS
> manage the account password. (This is under Directory Security in IIS)
>
> Make sure this new user also has directory permissions to the website
> directory files.
> You will need to reboot both machines after all the changes are made.
>
> There is a microsoft tech article on the trusted sql connection problem,
but
> I can't find it. I have had the same problem with asp and asp.net. I
> basically summed up how to resolve the connection problem with steps 1,2
and
> 4. Steps 3 is to set the asp.net application to use the new account.
>
> the sql connection string will then look like this:
> string Conn = "Initial Catalog=DBName;Data Source=ServerName;Integrated
> Security=SSPI;";
>
> I hope this helps.
> Rich.
>
> -----Original Message-----
> From: duck [mailto:bjs52@t...]
> Sent: Thursday, December 31, 1998 12:19 PM
> To: ASP+
> Subject: [aspx] [OOT] SQL Server Connection
>
>
> Hi, Guys.
>
> i need your help.
>
> i'm new in MSSQL.
> i have got an error message, when i'm trying make a connection between
> server and client for MSSQL2000.
> the server is using Win XP Prof and the client is using Win 98, and the
> network has already connected.
>
> the error message is like this :
> " Login failed for user 'ENDIE\Guest' Reason : Not Associated with trusted
> SQl Server Connection "
>
> can anyone tell me, what should i do ?
>
> thanks in Advance.
>
> regards
>
> M. Yadi M.
>
>
> --------------------------- Yang Mudah dan
> Menghibur ---------------------------------
> Hosting menjadi mudah dan murah hanya di PlasaCom. Klik
> http://idc.plasa.com
> F1 Mania!! Ikuti F1 Game di Obelix Game Corner di
> http://www.plasa.com/infotel/f1.html
> -------------------------------------------------------------------------
--
> ------------
>
>
>
>
>
>
Message #7 by "Duck" <bjs52@t...> on Sun, 11 Aug 2002 10:29:27 +0700
|
|
> The following was sent to me by Rich K. I haven't had time to try it yet.
> Let us know if it works...
> The trusted sql connection can be resolved in the following manner:
> 1.Create a new user account on both the SQL machine and IIS machine.
> (Make sure the user name and password are identical on both machines)
> ...
thank's Everyone.
it's working.
--------------------------- Yang Mudah dan Menghibur ---------------------------------
Hosting menjadi mudah dan murah hanya di PlasaCom. Klik http://idc.plasa.com
F1 Mania!! Ikuti F1 Game di Obelix Game Corner di http://www.plasa.com/infotel/f1.html
---------------------------------------------------------------------------------------
|
|
 |