Re: Newbie question on SQL connection
From: Rudy (Rudy_at_discussions.microsoft.com)
Date: 01/20/05
- Next message: Christopher: "Access Cache from Another Thread?"
- Previous message: Graham: "Thread timeouts"
- In reply to: Kevin Spencer: "Re: Newbie question on SQL connection"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 Jan 2005 18:15:02 -0800
THANK YOU THANK YOU THANK YOU!!
Kevin, you removed the block, I finally got it!! I knew it was something
simple, just doing it the wrong way. Thanks to all you helped me out with
this, I really appreciate all of your time and knowledge.
Rudy
"Kevin Spencer" wrote:
> Hi Rudy,
>
> Let me educate you about SQL Server security. SQL Server has 2 security
> configurations, as you've discovered. One is "Windows Only" and the other is
> "Mixed." The "Trusted Connection" error is associated with the "Windows
> Only" security mode. In the "Windows Only" security mode, only valid domain
> accounts that are specifically granted certain types of permissions in the
> SQL
> Server have access. Note that there are 2 conditions: First, a Windows
> domain user account. Second, granting permissions to these accounts in SQL
> Server. The second security model, "Mixed," means that SQL Server can
> maintain its own user accounts, which are separate from domain user
> accounts. These are SQL Server only. Note that "Mixed" means that you can
> have both Windows domain user accounts and SQL Server user accounts in SQL
> Server. In addition to creating these accounts, whether domain or SQL Server
> accounts, you must again grant SQL Server permissions to the accounts.
>
> In other words, regardless of whether you use "Windows Only" or "Mixed," you
> need to specifically grant the accounts the permissions they need to access
> SQL Server objects. Simply logging in with a domain user account doesn't
> allow the account to access anything, any more than creating a domain user
> account doesn't automatically grant any domain privileges to that account.
>
> In conclusion:
>
> "Windows Only": Log in with domain account that has been granted explicit
> database permissions.
> "Mixed": Log in with either domain account or SQL Server account that has
> been granted explicit database permissions.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> Neither a follower nor a lender be.
>
>
> "Rudy" <Rudy@discussions.microsoft.com> wrote in message
> news:F5CE656C-B35B-44BF-90A7-3A8F57627A3E@microsoft.com...
> > Hello all!
> >
> > Well, I hate to beat a dead horse, but I'm going to ride this dead thing
> > till I get it. I really appreciate everyones input. If anybody wanted to
> > make a trip to Wisconsin, there would be a case of your favorite brew. LOL
> > OK, So I fixed my web config, took out the Identity Impersonate, and fixed
> > some simple syntax errors. Now when I use this code
> > ''' Protected Const SQL_CONNECTION_STRING As String = _
> > ''' "Persist Security Info=False; Server=sbserver;" & _
> > ''' "Trusted_Connection=Yes; DataBase=IMSmidwest;" & _
> > ''' "Integrated Security=SSPI"
> > I get Login failed for user 'STMBL\ASPNET'. Reason: Not associated with a
> > trusted SQL Server connection.
> >
> > With this code
> > Protected Const SQL_CONNECTION_STRING As String = _
> > "Data Source=192.168.100.120,1533;Network Library=dbmssocn;Initial
> > Catalog=IMSmidwest;User ID=ASPNET;Password=******;"
> >
> > I get Login failed for user 'STMBL\ASPNET'.
> >
> > One thing I have noticed is when I run SQL query Analizer, I can't login
> > with SQL sever authentication, but I can with windows. Now I have my
> > server
> > setup windows Only, I tried Windows and SQL server. It didn't make a
> > diffrence. I'm so deep into this, I'm not even sure what I'm asking
> > anymore.
> > I noticed that ASPNET was made for me as a user on my develper computer,
> > but
> > on my domain I had to make the user myself. But it's still a diffrent
> > user,
> > "localhost\aspnet vs STMBL\aspnet.
> > I can still can connect to my server in SQL manager, and I can work with
> > both SQL servers. I have a feeling that I'm trying so many diffrent
> > things,
> > that the combination of settings is wrong, just not sure which is the best
> > way to approach this. Any other thoughts on this?
> >
> > Thanks for your time!
> >
> > Rudy
>
>
>
- Next message: Christopher: "Access Cache from Another Thread?"
- Previous message: Graham: "Thread timeouts"
- In reply to: Kevin Spencer: "Re: Newbie question on SQL connection"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|