473,385 Members | 1,587 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 1403
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.