472,951 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Error accessing SQL Server:

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


Nov 19 '05 #1
2 1389
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-*****@microsoft.com> wrote in message
news:eT****************@TK2MSFTNGP14.phx.gbl...
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

Nov 19 '05 #2
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" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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-*****@microsoft.com> wrote in message
news:eT****************@TK2MSFTNGP14.phx.gbl...
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


Nov 19 '05 #3

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

Similar topics

3
by: PW | last post by:
Hi, I'm using WinXP-Pro, ASP classic, IIS 5.0. I regularly get this error, but I know I am the only user accessing the website at the time of the error. I looked it up on the MS support...
5
by: VinnieT | last post by:
I have a load balanced system that consists of 3 production servers. There are about 20 different applications that are used on these boxes. One of my applications in particular is used more than...
3
by: AdamM | last post by:
Hi all, When I run my VbScript, I get the error: "ActiveX component can't create object: 'getobject'. Error 800A01AD". Any ideas what I did wrong? Here's my VBScript: dim o set...
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
13
by: JebBushell | last post by:
"Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
13
by: Praveen_db2 | last post by:
Hi All db2 8.1.3 Windows I am getting this error in db2diag.log.Please tell why is this error (-444) always there and how to go about for removing it. Diag.log output:...
3
by: fniles | last post by:
In our ASP page, we call XMLHttp to download XML files. When calling our page using localhost (localhost/myWebSite/myPage.htm), it works, but when calling using the IP address of the web server...
2
by: le0 | last post by:
guys, this is my first time to deploy website to the server, but every time i access the page this error always appears. ...
3
by: =?Utf-8?B?bWNpbWFnaW5n?= | last post by:
We have recently applied AJAX to our web site, nothing particularly fancy, just some update panel, progress images and collapsible panels, just the basics to improve the user experience. The...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...

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.