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 although my SQL Server supports both. I get: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. If I use credentials, which work on my windows 2000 IIS6, it fails in IIS7/2008.

On my windows 2008 box, I can setup an ODBC connection in the control panel and test it just fine, so I know I'm getting to the database server and test fine. It's just in IIS7 that it won't give me a break.

I have tried connecting via my remote IP address and my local IP address. Neither work, although both work with my other web server and my other websites.

I have scoured the web and everything trying to find a solution. Can you please help with any advice?

Thanks.

 

0
Nannette
10/17/2008 11:54:25 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

2 Replies
1501 Views

Similar Articles

[PageSpeed] 1

Hi Nannette,

This exception can be caused by a couple of reasons.

Sometimes, the application is running with anonymous access. However, there is "Integrated
Security=SSPI" in the connection string which means the identity of the user who is accessing the website should be passed to SQL Server to establish connection, but since the logged in
identity is anonymous, no user account was passed to SQL Server.

In addition, you may refer to the links below:

http://forums.asp.net/t/1140981.aspx
http://forums.asp.net/t/1237338.aspx
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=854321&SiteID=1
http://forums.asp.net/t/946809.aspx

 


Jian Kang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Jian
10/21/2008 7:03:44 AM

In step#5 below, I finally got it to work by using the SQL Server Authentication.

My config file connection string still uses Windows authentication, however.

(i)Add the Windows account to SQL Server:

1.

Start Enterprise Manager.
2. Expand Microsoft SQL Server, and then expand SQL Server Group.
3. Expand your server, and then expand Security.
4. Right-click Logins, and then click New Login.
5. In the SQL Server Login Properties dialog box, enter the Windows account name in the Name box. In the Domain list, select the domain that the Windows account is a member of.
6. Click the Database Access tab, set the appropriate permissions for the client, and then click OK.
0
Nannette
10/22/2008 5:21:49 AM
Reply:

Similar Artilces:

[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
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
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.
After sucessful installation of portal Starter kit, Portal Database was created and portaluser was the new login created. but when i tried to access the portalVBSDK on my PC this error is displayed. Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user '(null)'. Rea...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Hello, I have installed DotNetNuke on my computer and did everything they said in the Configuration. But when I want to start http://localhost/DotNetNuke I receive an error: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. What is this. There is a Datavbase called DotNetNuke in SQL-Server gr. miles You have to have a user assigned to the database and use those credentials in you connection string (web.config)...~ChrisNet Data Design706Horsman.us This is a sql/msde authentication issue. Your web.config is using windows authent...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
This code is giving me this error using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Text;     namespace WebApplication1 { /// <summary> /// Summary description for WebForm1. /// </summary> public class WebForm1 : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { SqlConnection con; string sql; SqlDataAdapter adExisting; //con = new SqlConnection("Data Source=slon12d11012";User ID=nnichol1;); //con = new SqlConnection("Initial Catalog=DACari;Data Source=slon12d1101...

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 hello, u need to privde a username and password for the SQL server that you are using !!!Bilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MVP 1. Open IIS, right-click on the virtual directory for your site and click on Properties. 2. Click the Dire...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
 Hmmm.... I have been developing a site on my local machine and it all works there. When I push it to the web-server it does not. I have used connection strings in my web.config file that look like this (the names have been changed to protect the innocent.. or me...) <add name="TDemoSiteConnectionString" connectionString="Data Source=192.168.8.37;Initial Catalog=TDemoSite;Persist Security Info=True;User ID=TDemo;Password=fred" providerName="System.Data.SqlClient" /> When I call a table adapter I get the error 'login failed for user null'. W...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Can anyone tell me why I get this error message and how to fix it? Thanks, Scott I would guess that it is because your SQL server is set up for windows authentication rather than mixed mode, and that your ASPNET account doesn't have a corresponding SQL server account. Jeff MartinMCSD C# .NEThttp://www.jeffmartin.com I found this method of changing modes on another site, and it helped me a lot. You can change the authentication to "SQL Server and Windows" by changing this registry setting: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer LoginMode = ...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Came in this morning and im getting the following error in our Provisioning tool. This was working as of yesterday and no changes were made to the web.config file. Ive failed over the cluster on the sql servers and also restarted the provisioning engine. Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. The SQL server is setup for mixed mode authentication and ive opened my web.config file with visual studio and can make a connection with the same sql user and pass thats in my web.config to the proper databases.  The provisioning se...

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. #5
 I'm having a hard time fixing a login.aspx page that was actually working a couple of days ago. I have SQL Server 2008 Express installed on the web server and have created an ASPNETDB.MDF file in the App_Data folder of my website.  The server is Windows Server 2003 R2 with SP 2.  On my Login.aspx page I have a <asp:login> control. I was getting this error when I tried to log in: Login failed for user 'NT AUTHORITY\NETWORK SERVICE' Someone suggested that I hard code a username and password in my connection string and now I get this: Login failed for ...

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 - 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. - asp.net.sql-datasource

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
If you send more email, you might make more money. Then again, you might destroy your reputation and revenue stream. Here's how to know what ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

MOTHER’S DAY: Facebook Examines Connections Between Moms, Kids
With Mother’s Day on the calendar this coming Sunday, Facebook examined the relationships between mothers and their children on the social network, ...

Ben Garcia gives Penrith Panthers a new French connection
Should he jag a game in the NRL, Ben Garcia will become just the third genuine French import to do so.

Man Charged With Aggravated Arson In Connection To Columbus Warehouse Fire
Police have charged 30-year-old Robin Toms with aggravated arson.

Facebook becomes more adept at dealing with crappy connections
... to get a decent phone signal to allow you to post a photo of your meal. Joking aside, in countries where people are struggling with 2G connections ...

Adam Savage from 'MythBusters' has an incredible connection to the 'Star Wars' franchise
Adam Savage, co-host of the popular " MythBusters " television show, soured on the plot of "Interstellar." But when it comes to the newest films ...

Arrest made in connection with California mosque fire
CNN Arrest made in connection with California mosque fire CNN (CNN) A California man was arrested Saturday in connection with a fire at a ...

UK Police Make Arrest in Connection With VTech Hacking
British law enforcement officials arrest a 21-year-old man in connection with attack on toy maker VTech that exposed 6 million parents and children ...

Resources last updated: 12/22/2015 12:08:41 AM