Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

hi all.

This is my first web form,and I am trying to conenct to a table in Ms SQL Server. when I run my program I got the followin error message:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

I am using windows 2000 authentication.
How can I fix it ?
Thanks
jsn
0
jsn1
3/30/2004 6:28:16 PM
asp.net.security 27051 articles. 1 followers. Follow

4 Replies
1217 Views

Similar Articles

[PageSpeed] 11

hello, u need to privde a username and password for the SQL server that you are using !!!
Bilal Hadiar, MCP, MCTS, MCPD, MCT
Microsoft MVP - Telerik MVP
0
haidar_bilal
3/30/2004 8:36:38 PM
1.  Open IIS, right-click on the virtual directory for your site and click on Properties.

2. Click the Directory Security tab.
3. Click the Edit button in the Anonymous access and authentication control region.
4. Uncheck "Anonymous access"

Darrell Norton, MVP
Darrell Norton's Blog


Please mark this post as answered if it helped you!
0
DarrellNorton
3/31/2004 1:23:33 AM
It means you are using Windows authentication to login to SQL Server, but the current user context does not have permissions to logon to remote resources.

For example, your website might be allowing anonymous access, and so IIS is impersonating the IUSR_<machinename> account (or ASP.Net is using the ASPNet account). However, both of these two accounts are local to the IIS server, and can't (by default) logon to remote resources.
You need to:
a) grant the appropriate Windows user account permissions to login to SQL Server
b) configure ASP.Net and/or IIS to use that account.
c) the account needs to be an account that can login to remote resources (eg a Domain account).
Cheers
Ken
0
Ken
3/31/2004 3:44:04 AM
Thanks

It worked unchecking th anonymous option.
jsn
0
jsn1
3/31/2004 11:19:16 AM
Reply:

Similar Artilces:

2008 IIS7 connection to SQL Server 2000 on Web Server 2000: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
I am setting up a windows 2008 IIS7 web server, and trying to connect to a windows 2000 sql server 2000 database. I have an IIS6 Windows 2000 web server activately connected just fine. I have anonymous and windows authentication enabled. And in my web.config I have identity impersonate="true" My sql server 2000 typically uses the IISUSER anonymous user set up in IIS6 on my original windows 2000 web server. But this new IIS7 is giving me grief. I can't seem to setup the IUSR or IISUSER or anything in it. I can't even use sql server credentials in my connection string altho...

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Hello All, I'm Getting the following error when calling a dll from my vb.net application. [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. The dll was written in vb6 and accesses a sql db using the following connection string. Public Const GLOBAL_DNS As String = "DSN=TransSrvFinal;UID=sa;PWD=admin;" This DLL works fine when called from other Windows Apps. However I'm now trying to call this dll from with in an asp.net application. I'm using vb.net as the codebehind. I'm a...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
Dear All,I am trying to establish a connection to my SQL Server which is on the Remote machine. My ASP.Net application is on the local machine. Below is my connection string: <appSettings><add key="NorthConn" value="server=ABC;integrated security=sspi;database=Northwind"/></appSettings>The North wind Database has the following user accounts:1) ABC\ASPNET2)ABC\IUSR_ABCboth of these accounts have permissions granted to them.My SQL Server has both Windows and SQL Server authentication checked. I checked the properties of my  web project in IIS  and it has both Anony...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
Hi i installed msde with follwoing attributes for a project DotnetNUke..C:\sql2ksp3\MSDE\>Setup.exe SAPWD="password "INSTANCENAME="DNNV3" SECURITYMODE=SQLin my web.config file here is what i am using==><appSettings>    <add key="SiteSqlServer" value="Server=(local);Database=DNNV3;uid=;pwd=password;" />   but i am getting below error...can anyone PLEASE help me on this.thanks a lotInstalling DotNetNukeUpgrade Error: ERROR: Could not connect to database specified in connectionString for SqlDataProvider   ---------------------------------------------...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
I dont believe that no one can help me in this damn error,Please, I'm gonne lose my job offer If I didnt fix this. I have spent 7 days searching with no use !! I use ASP.NET 2.0 with C# to develop an intranet site, it was working perfectly when i was on Visual Studio, when i tried to publish the site it gave me that error. Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. the web application on IIS server, windows 2003 - the database on a different server windows 2003, sql server 2000. Regaeding that we have proxy server, one fi...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection #2
I realize people have had this problem before. Probably on this very board. But I am up against a wall and none of the solutions I have found online work at all. I have a asp.net 1.x application that sits on an IIS server and talks to an SQL 2000 database on a separate server. It was working fine until about a week ago when all of the sudden I started recieving the following error: "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection" In IIS manager the application is set up in a virtual directory, denies anonymous users, and uses only Integrat...

Erro : Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
Hi, I am built-in web server feature of VS 2005 to run my web application as I dont IIS is intstalled on my desktop computer. from this page , application is connecting to SQL server 2000 installed on Windows 2003 Server  on a remote machine. Here is connectionStr = "Data Source=myservername; Integrated Security=True; Trusted_Connection=yes;Initial Catalog=myDB" Application is generating foloowing error message when try to open the connection SQLServer.Open() method. "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection" Any help in thi...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. #2
Basic setup IIS 6 with ASP.Net 2.0, Integrated Windows Authentication turned on (anonymous turned off) SQL Server 2000 with Windows Only Authentication on (SQL Server authentication turned off) web.config file contains the following relevant entries:<identity impersonate="true" /><authentication mode=Windows" /> connection string:Data Source=[server name]; Integrated Security=SSPI; Initial Catalog=[database name]; When I run my query on my development server, it runs perfectly. When I run it on the production server (which is just an exact xcopy of the development web site...

Web resources about - Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. - asp.net.security

Ted Cruz attacks Donald Trump's 'New York values,' Trump responds with 9/11
NORTH CHARLESTON, S.C. — Ted Cruz redoubled his attack that Donald Trump's "New York values" put him out of line with the GOP base — and Donald ...

Indonesia says attack underlines emergence of Islamic State threat
By Randy Fabi and Fergus Jensen JAKARTA (Reuters) - Indonesia must strengthen its defenses against Islamic State and work with neighboring countries ...

Powerball Winner Hoax: Viral Story Claims California Nurse Won Jackpot After Her Boss Bought $18,000 ...
The Powerball winner was revealed as a 62-year-old mother of seven kids, a hard-working nurse who was the beneficiary of a generous boss. But ...

U.S. to invest billions in self-driving cars
Self-driving cars got a financial shot in the arm from the federal government Thursday, but a new report shows the autonomous vehicles have safety ...

Caitlyn Jenner Reacts to Ricky Gervais' Golden Globes Joke
Caitlyn Jenner smiles while on stage promoting the second season of her show I Am Cait during the 2016 Winter TCA Tour on Thursday (January 14) ...

Apple iOS 9.3 Update For iPhone And iPad Gets Excellent Reviews From Users
Apple’s iOS 9.3 operating system is a beta release and Apple suggests that only developers download the update. However, many people other than ...

You can now make Skype voice and video calls from Slack
For all of its productivity superpowers, one feature Slack's communication platform lacks is voice and video calling features. Now Microsoft ...

Black Sabbath to release new songs with final tour
Heavy metal pioneers Black Sabbath are ready for "the end," but the band still has some new material. Black Sabbath announced Thursday that it ...

You can forget about streaming US Netflix content abroad
The streaming service's catalog of TV shows and movies varies widely from country to country, but you're just going to have to deal with it. ...

Foursquare's new CEO to shift company focus beyond consumers
Foursquare gambled big two years ago when it split its app in two. Unfortunately, that hasn't worked out so well. Despite reinstating universal ...

Resources last updated: 1/15/2016 4:37:44 AM