Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Error accessing SQL Server:

Reply
Thread Tools

Error accessing SQL Server:

 
 
news.microsoft.com
Guest
Posts: n/a
 
      06-07-2005
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.

I guess I get this because, my pages are hosted on WinXP IIS and the sql
server is on Win2k3.



So my aspnet a/c doesn't match with the Win2k3's aspnet a/c.



But what is the solution for this?



Thanks




 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      06-07-2005
Well, let me explain how SQL Server handles security first, so the next time
this issue comes up in some different fashion, you will know how to deal
with it.

SQL Server has 2 security modes: SQL Server only, and Mixed SQL Server and
Windows authentication. that is, SQL Server has its own built-in
authentication system, but it can also integrate with the local machine or
Active Directory to use Windows authentication. SQL Server's authentication
model is very similar to Windows, in that it has users and groups, and
specific levels of permissions. When SQL Server uses SQL Server
authentication, the Connection String must contain the user name and
password for that user to authenticate. In Windows authentication this is
not necessary, as the user's Windows credentials are passed in the message
itself. When using Windows authentication, the user that is requesting
access to the SQL Server must be a domain user account in Active Directory
(or the local machine, if the machine is not part of a domain), and that
account must be explicitly granted SQL Server parmissions.

Your error message indicates that you are using Windows authentication, in
which case, the user account under which your ASP.Net application is running
is not registered with SQL Server as a trusted account. Knowing that, your
solution is obvious.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"news.microsoft.com" <v-> wrote in message
news:eTg%...
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection.
>
> I guess I get this because, my pages are hosted on WinXP IIS and the sql
> server is on Win2k3.
>
>
>
> So my aspnet a/c doesn't match with the Win2k3's aspnet a/c.
>
>
>
> But what is the solution for this?
>
>
>
> Thanks
>
>
>
>



 
Reply With Quote
 
 
 
 
news.microsoft.com
Guest
Posts: n/a
 
      06-09-2005
Excellent info!

Thanks Kevin

I fixed it by creating a new login and using that.

I did not know how to give the asp.net a/c which is local on my machine,
access on sql server, as it can only read and understand AD accounts.

My webpages are hosted on another machine than the sql server, thus the
difference.

Thanks.

"Kevin Spencer" <> wrote in message
news:%...
> Well, let me explain how SQL Server handles security first, so the next
> time this issue comes up in some different fashion, you will know how to
> deal with it.
>
> SQL Server has 2 security modes: SQL Server only, and Mixed SQL Server and
> Windows authentication. that is, SQL Server has its own built-in
> authentication system, but it can also integrate with the local machine or
> Active Directory to use Windows authentication. SQL Server's
> authentication model is very similar to Windows, in that it has users and
> groups, and specific levels of permissions. When SQL Server uses SQL
> Server authentication, the Connection String must contain the user name
> and password for that user to authenticate. In Windows authentication this
> is not necessary, as the user's Windows credentials are passed in the
> message itself. When using Windows authentication, the user that is
> requesting access to the SQL Server must be a domain user account in
> Active Directory (or the local machine, if the machine is not part of a
> domain), and that account must be explicitly granted SQL Server
> parmissions.
>
> Your error message indicates that you are using Windows authentication, in
> which case, the user account under which your ASP.Net application is
> running is not registered with SQL Server as a trusted account. Knowing
> that, your solution is obvious.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> Ambiguity has a certain quality to it.
>
> "news.microsoft.com" <v-> wrote in message
> news:eTg%...
>> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
>> Server connection.
>>
>> I guess I get this because, my pages are hosted on WinXP IIS and the sql
>> server is on Win2k3.
>>
>>
>>
>> So my aspnet a/c doesn't match with the Win2k3's aspnet a/c.
>>
>>
>>
>> But what is the solution for this?
>>
>>
>>
>> Thanks
>>
>>
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL ERROR while executing the code java.sql.SQLException: ORA-01008: not all variables bound mahesh Java 3 04-06-2010 10:59 AM
Help. Getting a An error has occurred while establishing a connectionto the server. When connecting to SQL Server 2005, this failure may be causedby the fact that under the default settings SQL Server does not allow remote aboutjav.com@gmail.com ASP .Net 0 05-03-2008 12:43 PM
SQL Reference, SQL Queries, SQL help ecoolone ASP .Net 0 01-03-2008 10:58 AM
Error Accessing SQL Server from ASP.Net srvking Software 3 12-18-2007 09:18 PM
ASPNET error while accessing sql server report manager amitda@gmail.com ASP .Net 0 09-29-2006 04:12 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57