Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Friday, March 30, 2012

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Hi ,
I am using IIS 6.0 and have an ASP.NET where get the following error when
trying to connect from a .NET assembly.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
So I read some info from other forums and understand that I must add
the 'NT AUTHORITY\NETWORK SERVICE' as a user on my SQL Server 2005 database.
My problem is when I try to add this user by browsing for "Objects" in
Windows Server 2003, I don see this object. What am I missing?
Any ideas?By the way, my connection string is
"data source=NDS2214;Initial Catalog=UATP;Integrated Security=true"
"Opa" wrote:

> Hi ,
> I am using IIS 6.0 and have an ASP.NET where get the following error when
> trying to connect from a .NET assembly.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> So I read some info from other forums and understand that I must add
> the 'NT AUTHORITY\NETWORK SERVICE' as a user on my SQL Server 2005 databas
e.
> My problem is when I try to add this user by browsing for "Objects" in
> Windows Server 2003, I don see this object. What am I missing?
> Any ideas?

Login failed for user NT AUTHORITY\NETWORK SERVICE.

I've tried to use Windows authentication to connect to database in MS SQL Server 2000, my connection string like below:
"server=(local);Initial Catalog=myDatabase;Trusted_Connection=yes"
when I run my code, there is an error occur with below message:
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'
My SQL Server is configured as Window authentication.
I can't resolve this problem.
Please whow me how to do!
Thank you very much!
You either need to grant the Network Service account access rights toSQL Server, or your application needs to impersonate a specific Windowsuser that has rights to the database.

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

Users in remote building (On the same VLAN? Not sure of network specifics)
can connect to the sql server in the remote building with no issues. In my
building (HQ), we were able to connect to it until this morning. Last night
the domain controller in the remote building was upgraded to Windows 2003. I
know of no other changes to this environment. I am able to use a remote
management tool (dameware) and log on locally to this sql server and then
connect. If I add a named pipes alias in my client network utility for this
server I can then connect remotely. I'm worried that the problem was caused
by the domain controller upgrade and there are several more of these
scheduled in other buildings. The one that we're having trouble with right
now is very insignificant. Should these results be repeated with subsequent
domain controller upgrades, our entire company could be affected. I can't
seem to get the right information to the domain controller folks to prove
that the cause of this issue was the upgrade nor am I really sure that this
IS the cause. The sql server is listening on port 1433 (tested using
telnet). I can ping it and access the host in every other way from here -
just can't use anything to connect to the sql server.
Thanks for your help!
Michelle
There was a kerberos service on the domain controller that was not started.
Starting this service resolved the issue. I believe that there is a KB
article on this but unfortunately, I was unable to locate it myself.
"michelle" <michelle@.nospam.com> wrote in message
news:eCqv6ohDFHA.628@.TK2MSFTNGP15.phx.gbl...
> Users in remote building (On the same VLAN? Not sure of network specifics)
> can connect to the sql server in the remote building with no issues. In my
> building (HQ), we were able to connect to it until this morning. Last
night
> the domain controller in the remote building was upgraded to Windows 2003.
I
> know of no other changes to this environment. I am able to use a remote
> management tool (dameware) and log on locally to this sql server and then
> connect. If I add a named pipes alias in my client network utility for
this
> server I can then connect remotely. I'm worried that the problem was
caused
> by the domain controller upgrade and there are several more of these
> scheduled in other buildings. The one that we're having trouble with right
> now is very insignificant. Should these results be repeated with
subsequent
> domain controller upgrades, our entire company could be affected. I can't
> seem to get the right information to the domain controller folks to prove
> that the cause of this issue was the upgrade nor am I really sure that
this
> IS the cause. The sql server is listening on port 1433 (tested using
> telnet). I can ping it and access the host in every other way from here -
> just can't use anything to connect to the sql server.
> Thanks for your help!
> Michelle
>

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

Users in remote building (On the same VLAN? Not sure of network specifics)
can connect to the sql server in the remote building with no issues. In my
building (HQ), we were able to connect to it until this morning. Last night
the domain controller in the remote building was upgraded to Windows 2003. I
know of no other changes to this environment. I am able to use a remote
management tool (dameware) and log on locally to this sql server and then
connect. If I add a named pipes alias in my client network utility for this
server I can then connect remotely. I'm worried that the problem was caused
by the domain controller upgrade and there are several more of these
scheduled in other buildings. The one that we're having trouble with right
now is very insignificant. Should these results be repeated with subsequent
domain controller upgrades, our entire company could be affected. I can't
seem to get the right information to the domain controller folks to prove
that the cause of this issue was the upgrade nor am I really sure that this
IS the cause. The sql server is listening on port 1433 (tested using
telnet). I can ping it and access the host in every other way from here -
just can't use anything to connect to the sql server.
Thanks for your help!
MichelleThere was a kerberos service on the domain controller that was not started.
Starting this service resolved the issue. I believe that there is a KB
article on this but unfortunately, I was unable to locate it myself.
"michelle" <michelle@.nospam.com> wrote in message
news:eCqv6ohDFHA.628@.TK2MSFTNGP15.phx.gbl...
> Users in remote building (On the same VLAN? Not sure of network specifics)
> can connect to the sql server in the remote building with no issues. In my
> building (HQ), we were able to connect to it until this morning. Last
night
> the domain controller in the remote building was upgraded to Windows 2003.
I
> know of no other changes to this environment. I am able to use a remote
> management tool (dameware) and log on locally to this sql server and then
> connect. If I add a named pipes alias in my client network utility for
this
> server I can then connect remotely. I'm worried that the problem was
caused
> by the domain controller upgrade and there are several more of these
> scheduled in other buildings. The one that we're having trouble with right
> now is very insignificant. Should these results be repeated with
subsequent
> domain controller upgrades, our entire company could be affected. I can't
> seem to get the right information to the domain controller folks to prove
> that the cause of this issue was the upgrade nor am I really sure that
this
> IS the cause. The sql server is listening on port 1433 (tested using
> telnet). I can ping it and access the host in every other way from here -
> just can't use anything to connect to the sql server.
> Thanks for your help!
> Michelle
>

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Hello all -

I'm trying to connect to a Sql Server 2005 database from my local development machine, which is running IIS 5.1 (Windows XP Pro). The web application is not using impersonation and has anonymous access enabled. In my system's machine.config file, I've set the processModel section to look like:

<processModel userName="System" password="AutoGenerate" />

This has been working fine for us connecting to SQL Server 2000 databases (running on Windows 2003). When we connect, I access Sql 2000 databases under the context of "OurDomain\MyMachineName$". However, we've recently installed Sql Server 2005 on a new Windows 2003 server & when I connect to that server, I receive the error:

System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

when trying to call the SqlConnection.Open() method. Our connection string is very basic:

Data Source=sql-dev2; Initial Catalog=TestDatabase; Integrated Security=True; Application Name=PrototypeWebservice;

In the Sql Server logins, we've granted the computer account "OurDomain\MyMachineName$" db_owner access to every database (in both Sql Server 2000 & 2005).

I am able to connect to the Sql Server 2005 databases if I change my section in machine.config to <processModel userName="OurDomina\myPersonalAccount" password="myPersonalPwd"/>, or if I move the application to an IIS6 server & set the application pool identity to NETWORK SERVICE, but we'd like to continue accessing our Sql Server 2005 databases (from our development machines running IIS5.1) as we currently access our Sql Server 2000 databases; under the context of "OurDomain\MyMachineName$".

Would anyone have any ideas why this would be happening or how to resolve? Thanks in advance.

Please check this blog: http://blogs.msdn.com/sql_protocols/archive/2006/12/02/understanding-kerberos-and-ntlm-authentication-in-sql-server-connections.aspx

.....

[1] "Login Failed for user 'NT Authority\ANONYMOUS' LOGON"

In this scenario, client make tcp connection, and it is most likely running under LocalSystem account, and there is no SPN registered for SQL instance, hence, NTLM is used, however, LocalSystem account inherits from System Context instead of a true user-based context, thus, failed as 'ANONYMOUS LOGON'. See http://support.microsoft.com/kb/132679.

The workaround here is

a. ask your domain administrator to manually register SPN if your SQL Server running under a domain user account.

b. use NP connection.

c. change your sql server to run under either localsystem account or networkservice account.

|||

That was the ticket!!! Thank you very much.

For future reference, the problem we ran into was that we had multiple active directory accounts registered with the same SPN. One entry was registered under the computer account sql server was running on & the other was the user account the sql server service was running under. We detected this by looking into the System event log on the domains PDC (the entry was EventID 11, Source KDC. Exact steps we followed were those suggested by other users on the thread: http://www.eventid.net/display.asp?eventid=11&eventno=569&source=KDC&phase=1). After removing the entry for the computer account, kerberos authentication succeeded.

Thanks again!

|||Thanks for the feedback.

Wednesday, March 28, 2012

Login failed for user NT AUTHORITY\ANONYMOUS LOGON

Hello everyone,

I am receiving the above error when using a workstation to connect to my webfiles.

I am using windows authentication (whcih I have selected as my only option on the IIS).
Impersonate is set to true in the webconfig file, with authentication set to Windows.

My connection string is: SQLConnection1 = "initial catalog=SIMS;data source=spacesql;integrated security=SSPI"

It runs no problem when I use the localhost.
It allows me to use other aspx pages that do not connect to the SQL server.
It only gives me this error when I am using a page that tries to connect to the SQL server.

The SQL files reside on a separate server to the IIS and I would like it to remain this way.

Can anyone help me wit this please

Thank you,

RebeccaOk, stupid question.

How is an SQL Server on Computer B supposed to authorize users according to a user account on computer A? Without domain, without using a domain account et al.

Answer: it can not.

An this is your problem.|||Hi,
I suggest you look for information on 'Accessing SQL Server using a Mapped Windows Domain Server'. That may have the solution you are looking for. Try msdn.microsoft.com, and look for this and other authentication and authorization info for web based applications.
Good luck with your project.|||Both computers are on a domain using a domain account et al.
I am not that stupid.

Login failed for user ASPNET

Hello,
I am getting following error when I tried to connect to the database.

Login failed for user 'SHALINI\ASPNET'

I am new to this and don't know how to fix it. I am runningSQL Server Desktop engine 2000. I could connect through Server Explorer window, but not through ADO.NET
Here's my connection string:

sConnectionString = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyStore;Data Source=SHALINI;Workstation ID=SHALINI"

I have IIS and SQL Server running on the same machine.
Please please help me.
Thanks in Advance

If you are just developing on your local machine, be sure the database has the proper permissions.
Also, you may want to try this conn string...

sql = "Initial Catalog=MyStore;Data Source=localhost;Integrated Security=SSPI;"
But once the database is moved to a production server, you would want to change the string to something like...

sql = "Server=isp.com;Database=MyStore;UID=****;PWD=****;"
But this sounds like a permission problem, one in sql server db and in the folder.
You may also want to check the permissions on you folder where you are developing the app, the one in wwwroot.

Hope this helps,
Zath

sql

Login failed for user ?

Im having trouble to connect to my database server, im using this connectionstring.

<addname="LocalSqlServer"connectionString="Data Source=.;Initial Catalog=aspnetdb;Integrated Security=True"providerName="System.Data.SqlClient" />
But i always get this error,

Login failed for user ''. The user is not associated with a trusted SQL Server connection.
As u can see there is no user? the aspnet_wp.exe is running with my active ASPNET user, i don't know what's wrong here.

Try this
<addkey="ConnString"value="Database=databaseName; Server=serverName; uid=myUserName_writer; pwd=myPasswordr; Persist Security Info=True"/>

where 'uid' and 'pwd' are username and password for your Sql Server.

HTH

|||Try this one :
<addname="LocalSqlServer"connectionString="Data Source=.;Initial Catalog=aspnetdb;Integrated Security=True";Trusted_Connection=Yes;providerName="System.Data.SqlClient" />

login failed for user ... Not Associated with a trusted SQL Server

Hello,
I'm trying to connect a mobile computer runing under windows CE to a
database located on a windows XP desktop.
The mobile computer application is written in C# under Visual Studio .NET
2003.
My problem occurs when I execute mConnection.Open();
A SqlException is caught with this message :
Login failed for user '(null)'. Reason : Not associated with a trusted SQL
Server connection.
here is the connection string :
mConnection = new SqlConnection("User ID=sa;data source=" + mSqlServer +
";Integrated Security=SSPI;initial catalog=IDPS;Password=xxxx;persist
security info=false;Trusted_Connection=yes");
What can I do to correct it ?
In your connection string, you are specifying parameters for
both SQL authentication and Windows authentication - it
needs to be one or the other. If you use Windows
authentication, you don't specify a user id and password.
You can find some examples at:
http://www.carlprothman.net/Default...anagedProvider
-Sue
On Tue, 2 Aug 2005 07:56:11 -0700, Christian F CLY
<ChristianFCLY@.discussions.microsoft.com> wrote:

>Hello,
>I'm trying to connect a mobile computer runing under windows CE to a
>database located on a windows XP desktop.
>The mobile computer application is written in C# under Visual Studio .NET
>2003.
>My problem occurs when I execute mConnection.Open();
>A SqlException is caught with this message :
>Login failed for user '(null)'. Reason : Not associated with a trusted SQL
>Server connection.
>here is the connection string :
>mConnection = new SqlConnection("User ID=sa;data source=" + mSqlServer +
>";Integrated Security=SSPI;initial catalog=IDPS;Password=xxxx;persist
>security info=false;Trusted_Connection=yes");
>What can I do to correct it ?

login failed for user ... Not Associated with a trusted SQL Server

Hello,
I'm trying to connect a mobile computer runing under windows CE to a
database located on a Windows XP desktop.
The mobile computer application is written in C# under Visual Studio .NET
2003.
My problem occurs when I execute mConnection.Open();
A SqlException is caught with this message :
Login failed for user '(null)'. Reason : Not associated with a trusted SQL
Server connection.
here is the connection string :
mConnection = new SqlConnection("User ID=sa;data source=" + mSqlServer +
";Integrated Security=SSPI;initial catalog=IDPS;Password=xxxx;persist
security info=false;Trusted_Connection=yes");
What can I do to correct it ?In your connection string, you are specifying parameters for
both SQL authentication and Windows authentication - it
needs to be one or the other. If you use Windows
authentication, you don't specify a user id and password.
You can find some examples at:
http://www.carlprothman.net/Default...ManagedProvider
-Sue
On Tue, 2 Aug 2005 07:56:11 -0700, Christian F CLY
<ChristianFCLY@.discussions.microsoft.com> wrote:

>Hello,
>I'm trying to connect a mobile computer runing under windows CE to a
>database located on a Windows XP desktop.
>The mobile computer application is written in C# under Visual Studio .NET
>2003.
>My problem occurs when I execute mConnection.Open();
>A SqlException is caught with this message :
>Login failed for user '(null)'. Reason : Not associated with a trusted SQL
>Server connection.
>here is the connection string :
>mConnection = new SqlConnection("User ID=sa;data source=" + mSqlServer +
>";Integrated Security=SSPI;initial catalog=IDPS;Password=xxxx;persist
>security info=false;Trusted_Connection=yes");
>What can I do to correct it ?sql

Login failed for user ''. The user is not associated with a trusted SQL Server connection. &qu

Hi all,

Can someone explain it to me why I am getting the following error when I try to connect SQL server express with .NET 2.0?

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 ''. The user is not associated with a trusted SQL Server connection.

Here is my code and i am using windows authentication:

<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SqlClient" %>

<%

Dim connAkaki As SqlConnection
Dim cmdSelectAuthers As SqlCommand
Dim dtrAuthers As SqlDataReader

connAkaki = New SqlConnection("Server=.\SQLEXPRESS;database=akaki")

connAkaki.Open()

cmdSelectAuthers = New SqlCommand("select Firstname from UserTableTest", connAkaki)
dtrAuthers= cmdSelectAuthers.ExecuteReader()

While dtrAuthers.Read()
Response.Write("<li>")
Response.Write(dtrAuthers("Firstname"))

End While

dtrAuthers.Close()
connAkaki.Close()

%>

Have you added the ASP.Net service account as a user in SQL Server? The error message is saying that the current user that is trying to connect has not been registered as a login in SQL Server.|||Hi there,

I was going to reply to your earlier post on the same/similar topic but since this one's newer I will post here.

The username with which the ASP.NET web application runs is different to the username you used to log into the computer with so chances are that the user is not defined in SQL Server's list of logins and so you get problems when using Windows Authentication.

A way around this is to use SQL Server authentication when trying to access your SQL Server. If you do this, your connection string will be:

connAkai = new System.Data.SqlClient.SqlConnection("Server=.\\NATHAN;database=Northwind; User ID=<SQL Server Login>; Password=<Password For Login>");

In a production system you would probably do more to secure that password (i.e. don't place it plain-text in the code) like putting it in the registry or some other methods but as an example I think it will do.

Hope that helps a bit, but sorry if it doesn't

|||

The SQL Server system by default is set to use only Windows Accounts and not SQL Server authentication, you can turn it on but I would leave it as is and use the windows accounts.

With ASP.Net generally the asp.net system by default runs under the Network Service account, to use it in the database you will need to make sure that the Network Service account has permissions for the database that you are using.

Another option is to make the asp.net application that you are working use a different account, this will help to secure your application. One way to do this is to reconfigure the application pool for the asp.net application that you have and make it run under the new account.

|||

Hi All!

How can add the ASP.Net service account as a user in SQL Server 2005?

|||

Huh? An MS Knowledge base article (http://support.microsoft.com/kb/555332) says just the opposite:

RESOLUTION

Change the Authentication Mode of the SQL server from "Windows Authentication Mode (Windows Authentication)"
to "Mixed Mode (Windows Authentication and SQL Server Authentication)".

|||

Steps to change SQLExpress to "SQL Server and Windows Authentication Mode"

If you are lucky to have Microsoft SQL server Management Studio installed, then can browse to the SQL server Instance and right-click to bring up the Server Property. Server Property -> Security -> check "SQL Server and Windows Authentication Mode" option under "Server Authentication" section, and then restart the SQLExpress.

If you don't have Microsoft SQL server Management Studio installed, the if you are running on XP Professional, following SQL statements will do the same:

You have to first login to SQLExpress using osql utility.

USE [master]

GO

EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2

GO

Hope that will help.

Derek

|||

Hey Glen, I have the same problem only I can't get sqlexpress to allow me to logon in SQL Server Auth mode. I can't even logon using my server (in my house). It will let me log on in Windows Authentication but not SQL Server Authentication? I have nothing on this machine and I reininstalled SQL Express twice. I am the sole admin .

All I want to do is create a blank database (which I did) and log onto it. I watched video 7 on microsoft and opened my fireall udp and added me as doadmin. I added sqlbrowser.exe,sqlserver.exe and udp port 1434 for sql via web in windows firewall. I also opened port 1434 on my hardlinksys router which only has port 80 and 1434 udp opened. (Public Webserver not hacked yet). Eventually, I added all permissions for my self (admin). I right clicked on my new database ("WebWizforums") IE not real database name. I added permissions under my user name and granted all permissions.It's only my user name in permissions noone else. I'll tighten ship perms after I see that she works...

Forum software is what I want to try http://www.webwizguide.com/webwizforums/kb/sql_server_install.asp seems real easy but I can't figure it out? MS Access I knew inside and out but now ...no more MSDE or MSJet on Longhorn OS.

Can anyone explain this simple task "Clearly?" Pretend I have no idea what I'm doing .... Smile Thanks Gates for forcing my higher "edgeamycashun."

SQL Express for dummies!

Learning SQL is like filing tax returns...put it off to the last minute!

Mike C

|||

Ok, I triple checked everything then I rebooted....now it works? I guess start and stop will be learned as stupid sql tricks.

ok, I added the database tables with no problems however, I get this message when I log into the (ADMIN.asp) page

Server Error in Forum Application
An error has occurred while connecting to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_db_connection
File Name:- common.asp

Error details:-
Microsoft OLE DB Provider for SQL Server
Invalid connection string attribute

I searched for Common.asp and right clicked it. It has READ at min. So next is connection String?

I got yarn? but no connection.

Getting closer Watson.

Mike

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Hi all,

Can someone explain it to me why I am getting the following error when I try to connect SQL server express with .NET 2.0?

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 ''. The user is not associated with a trusted SQL Server connection.

Here is my code and i am using windows authentication:

<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SqlClient" %>

<%

Dim connAkaki As SqlConnection
Dim cmdSelectAuthers As SqlCommand
Dim dtrAuthers As SqlDataReader

connAkaki = New SqlConnection("Server=.\SQLEXPRESS;database=akaki")

connAkaki.Open()

cmdSelectAuthers = New SqlCommand("select Firstname from UserTableTest", connAkaki)
dtrAuthers= cmdSelectAuthers.ExecuteReader()

While dtrAuthers.Read()
Response.Write("<li>")
Response.Write(dtrAuthers("Firstname"))

End While

dtrAuthers.Close()
connAkaki.Close()

%>

Have you added the ASP.Net service account as a user in SQL Server? The error message is saying that the current user that is trying to connect has not been registered as a login in SQL Server.|||Hi there,

I was going to reply to your earlier post on the same/similar topic but since this one's newer I will post here.

The username with which the ASP.NET web application runs is different to the username you used to log into the computer with so chances are that the user is not defined in SQL Server's list of logins and so you get problems when using Windows Authentication.

A way around this is to use SQL Server authentication when trying to access your SQL Server. If you do this, your connection string will be:

connAkai = new System.Data.SqlClient.SqlConnection("Server=.\\NATHAN;database=Northwind; User ID=<SQL Server Login>; Password=<Password For Login>");

In a production system you would probably do more to secure that password (i.e. don't place it plain-text in the code) like putting it in the registry or some other methods but as an example I think it will do.

Hope that helps a bit, but sorry if it doesn't

|||

The SQL Server system by default is set to use only Windows Accounts and not SQL Server authentication, you can turn it on but I would leave it as is and use the windows accounts.

With ASP.Net generally the asp.net system by default runs under the Network Service account, to use it in the database you will need to make sure that the Network Service account has permissions for the database that you are using.

Another option is to make the asp.net application that you are working use a different account, this will help to secure your application. One way to do this is to reconfigure the application pool for the asp.net application that you have and make it run under the new account.

|||

Hi All!

How can add the ASP.Net service account as a user in SQL Server 2005?

|||

Huh? An MS Knowledge base article (http://support.microsoft.com/kb/555332) says just the opposite:

RESOLUTION

Change the Authentication Mode of the SQL server from "Windows Authentication Mode (Windows Authentication)"
to "Mixed Mode (Windows Authentication and SQL Server Authentication)".

|||

Steps to change SQLExpress to "SQL Server and Windows Authentication Mode"

If you are lucky to have Microsoft SQL server Management Studio installed, then can browse to the SQL server Instance and right-click to bring up the Server Property. Server Property -> Security -> check "SQL Server and Windows Authentication Mode" option under "Server Authentication" section, and then restart the SQLExpress.

If you don't have Microsoft SQL server Management Studio installed, the if you are running on XP Professional, following SQL statements will do the same:

You have to first login to SQLExpress using osql utility.

USE [master]

GO

EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2

GO

Hope that will help.

Derek

|||

Hey Glen, I have the same problem only I can't get sqlexpress to allow me to logon in SQL Server Auth mode. I can't even logon using my server (in my house). It will let me log on in Windows Authentication but not SQL Server Authentication? I have nothing on this machine and I reininstalled SQL Express twice. I am the sole admin .

All I want to do is create a blank database (which I did) and log onto it. I watched video 7 on microsoft and opened my fireall udp and added me as doadmin. I added sqlbrowser.exe,sqlserver.exe and udp port 1434 for sql via web in windows firewall. I also opened port 1434 on my hardlinksys router which only has port 80 and 1434 udp opened. (Public Webserver not hacked yet). Eventually, I added all permissions for my self (admin). I right clicked on my new database ("WebWizforums") IE not real database name. I added permissions under my user name and granted all permissions.It's only my user name in permissions noone else. I'll tighten ship perms after I see that she works...

Forum software is what I want to try http://www.webwizguide.com/webwizforums/kb/sql_server_install.asp seems real easy but I can't figure it out? MS Access I knew inside and out but now ...no more MSDE or MSJet on Longhorn OS.

Can anyone explain this simple task "Clearly?" Pretend I have no idea what I'm doing .... Smile Thanks Gates for forcing my higher "edgeamycashun."

SQL Express for dummies!

Learning SQL is like filing tax returns...put it off to the last minute!

Mike C

|||

Ok, I triple checked everything then I rebooted....now it works? I guess start and stop will be learned as stupid sql tricks.

ok, I added the database tables with no problems however, I get this message when I log into the (ADMIN.asp) page

Server Error in Forum Application
An error has occurred while connecting to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_db_connection
File Name:- common.asp

Error details:-
Microsoft OLE DB Provider for SQL Server
Invalid connection string attribute

I searched for Common.asp and right clicked it. It has READ at min. So next is connection String?

I got yarn? but no connection.

Getting closer Watson.

Mike

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Hi all,

Can someone explain it to me why I am getting the following error when I try to connect SQL server express with .NET 2.0?

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 ''. The user is not associated with a trusted SQL Server connection.

Here is my code and i am using windows authentication:

<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SqlClient" %>

<%

Dim connAkaki As SqlConnection
Dim cmdSelectAuthers As SqlCommand
Dim dtrAuthers As SqlDataReader

connAkaki = New SqlConnection("Server=.\SQLEXPRESS;database=akaki")


connAkaki.Open()

cmdSelectAuthers = New SqlCommand("select Firstname from UserTableTest", connAkaki)
dtrAuthers= cmdSelectAuthers.ExecuteReader()


While dtrAuthers.Read()
Response.Write("<li>")
Response.Write(dtrAuthers("Firstname"))

End While

dtrAuthers.Close()
connAkaki.Close()

%>

Have you added the ASP.Net service account as a user in SQL Server? The error message is saying that the current user that is trying to connect has not been registered as a login in SQL Server.|||Hi there,

I was going to reply to your earlier post on the same/similar topic but since this one's newer I will post here.

The username with which the ASP.NET web application runs is different to the username you used to log into the computer with so chances are that the user is not defined in SQL Server's list of logins and so you get problems when using Windows Authentication.

A way around this is to use SQL Server authentication when trying to access your SQL Server. If you do this, your connection string will be:

connAkai = new System.Data.SqlClient.SqlConnection("Server=.\\NATHAN;database=Northwind; User ID=<SQL Server Login>; Password=<Password For Login>");

In a production system you would probably do more to secure that password (i.e. don't place it plain-text in the code) like putting it in the registry or some other methods but as an example I think it will do.

Hope that helps a bit, but sorry if it doesn't

|||

The SQL Server system by default is set to use only Windows Accounts and not SQL Server authentication, you can turn it on but I would leave it as is and use the windows accounts.

With ASP.Net generally the asp.net system by default runs under the Network Service account, to use it in the database you will need to make sure that the Network Service account has permissions for the database that you are using.

Another option is to make the asp.net application that you are working use a different account, this will help to secure your application. One way to do this is to reconfigure the application pool for the asp.net application that you have and make it run under the new account.

|||

Hi All!

How can add the ASP.Net service account as a user in SQL Server 2005?

|||

Huh? An MS Knowledge base article (http://support.microsoft.com/kb/555332) says just the opposite:

RESOLUTION

Change the Authentication Mode of the SQL server from "Windows Authentication Mode (Windows Authentication)"
to "Mixed Mode (Windows Authentication and SQL Server Authentication)".

|||

Steps to change SQLExpress to "SQL Server and Windows Authentication Mode"

If you are lucky to have Microsoft SQL server Management Studio installed, then can browse to the SQL server Instance and right-click to bring up the Server Property. Server Property -> Security -> check "SQL Server and Windows Authentication Mode" option under "Server Authentication" section, and then restart the SQLExpress.

If you don't have Microsoft SQL server Management Studio installed, the if you are running on XP Professional, following SQL statements will do the same:

You have to first login to SQLExpress using osql utility.

USE [master]

GO

EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2

GO

Hope that will help.

Derek

|||

Hey Glen, I have the same problem only I can't get sqlexpress to allow me to logon in SQL Server Auth mode. I can't even logon using my server (in my house). It will let me log on in Windows Authentication but not SQL Server Authentication? I have nothing on this machine and I reininstalled SQL Express twice. I am the sole admin .

All I want to do is create a blank database (which I did) and log onto it. I watched video 7 on microsoft and opened my fireall udp and added me as doadmin. I added sqlbrowser.exe,sqlserver.exe and udp port 1434 for sql via web in windows firewall. I also opened port 1434 on my hardlinksys router which only has port 80 and 1434 udp opened. (Public Webserver not hacked yet). Eventually, I added all permissions for my self (admin). I right clicked on my new database ("WebWizforums") IE not real database name. I added permissions under my user name and granted all permissions.It's only my user name in permissions noone else. I'll tighten ship perms after I see that she works...

Forum software is what I want to try http://www.webwizguide.com/webwizforums/kb/sql_server_install.asp seems real easy but I can't figure it out? MS Access I knew inside and out but now ...no more MSDE or MSJet on Longhorn OS.

Can anyone explain this simple task "Clearly?" Pretend I have no idea what I'm doing .... Smile Thanks Gates for forcing my higher "edgeamycashun."

SQL Express for dummies!

Learning SQL is like filing tax returns...put it off to the last minute!

Mike C

|||

Ok, I triple checked everything then I rebooted....now it works? I guess start and stop will be learned as stupid sql tricks.

ok, I added the database tables with no problems however, I get this message when I log into the (ADMIN.asp) page

Server Error in Forum Application
An error has occurred while connecting to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_db_connection
File Name:- common.asp

Error details:-
Microsoft OLE DB Provider for SQL Server
Invalid connection string attribute

I searched for Common.asp and right clicked it. It has READ at min. So next is connection String?

I got yarn? but no connection.

Getting closer Watson.

Mike

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Hi all,

Can someone explain it to me why I am getting the following error when I try to connect SQL server express with .NET 2.0?

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 ''. The user is not associated with a trusted SQL Server connection.

Here is my code and i am using windows authentication:

<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SqlClient" %>

<%

Dim connAkaki As SqlConnection
Dim cmdSelectAuthers As SqlCommand
Dim dtrAuthers As SqlDataReader

connAkaki = New SqlConnection("Server=.\SQLEXPRESS;database=akaki")

connAkaki.Open()

cmdSelectAuthers = New SqlCommand("select Firstname from UserTableTest", connAkaki)
dtrAuthers= cmdSelectAuthers.ExecuteReader()

While dtrAuthers.Read()
Response.Write("<li>")
Response.Write(dtrAuthers("Firstname"))

End While

dtrAuthers.Close()
connAkaki.Close()

%>

Have you added the ASP.Net service account as a user in SQL Server? The error message is saying that the current user that is trying to connect has not been registered as a login in SQL Server.|||Hi there,

I was going to reply to your earlier post on the same/similar topic but since this one's newer I will post here.

The username with which the ASP.NET web application runs is different to the username you used to log into the computer with so chances are that the user is not defined in SQL Server's list of logins and so you get problems when using Windows Authentication.

A way around this is to use SQL Server authentication when trying to access your SQL Server. If you do this, your connection string will be:

connAkai = new System.Data.SqlClient.SqlConnection("Server=.\\NATHAN;database=Northwind; User ID=<SQL Server Login>; Password=<Password For Login>");

In a production system you would probably do more to secure that password (i.e. don't place it plain-text in the code) like putting it in the registry or some other methods but as an example I think it will do.

Hope that helps a bit, but sorry if it doesn't

|||

The SQL Server system by default is set to use only Windows Accounts and not SQL Server authentication, you can turn it on but I would leave it as is and use the windows accounts.

With ASP.Net generally the asp.net system by default runs under the Network Service account, to use it in the database you will need to make sure that the Network Service account has permissions for the database that you are using.

Another option is to make the asp.net application that you are working use a different account, this will help to secure your application. One way to do this is to reconfigure the application pool for the asp.net application that you have and make it run under the new account.

|||

Hi All!

How can add the ASP.Net service account as a user in SQL Server 2005?

|||

Huh? An MS Knowledge base article (http://support.microsoft.com/kb/555332) says just the opposite:

RESOLUTION

Change the Authentication Mode of the SQL server from "Windows Authentication Mode (Windows Authentication)"
to "Mixed Mode (Windows Authentication and SQL Server Authentication)".

|||

Steps to change SQLExpress to "SQL Server and Windows Authentication Mode"

If you are lucky to have Microsoft SQL server Management Studio installed, then can browse to the SQL server Instance and right-click to bring up the Server Property. Server Property -> Security -> check "SQL Server and Windows Authentication Mode" option under "Server Authentication" section, and then restart the SQLExpress.

If you don't have Microsoft SQL server Management Studio installed, the if you are running on XP Professional, following SQL statements will do the same:

You have to first login to SQLExpress using osql utility.

USE [master]

GO

EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2

GO

Hope that will help.

Derek

|||

Hey Glen, I have the same problem only I can't get sqlexpress to allow me to logon in SQL Server Auth mode. I can't even logon using my server (in my house). It will let me log on in Windows Authentication but not SQL Server Authentication? I have nothing on this machine and I reininstalled SQL Express twice. I am the sole admin .

All I want to do is create a blank database (which I did) and log onto it. I watched video 7 on microsoft and opened my fireall udp and added me as doadmin. I added sqlbrowser.exe,sqlserver.exe and udp port 1434 for sql via web in windows firewall. I also opened port 1434 on my hardlinksys router which only has port 80 and 1434 udp opened. (Public Webserver not hacked yet). Eventually, I added all permissions for my self (admin). I right clicked on my new database ("WebWizforums") IE not real database name. I added permissions under my user name and granted all permissions.It's only my user name in permissions noone else. I'll tighten ship perms after I see that she works...

Forum software is what I want to try http://www.webwizguide.com/webwizforums/kb/sql_server_install.asp seems real easy but I can't figure it out? MS Access I knew inside and out but now ...no more MSDE or MSJet on Longhorn OS.

Can anyone explain this simple task "Clearly?" Pretend I have no idea what I'm doing .... Smile Thanks Gates for forcing my higher "edgeamycashun."

SQL Express for dummies!

Learning SQL is like filing tax returns...put it off to the last minute!

Mike C

|||

Ok, I triple checked everything then I rebooted....now it works? I guess start and stop will be learned as stupid sql tricks.

ok, I added the database tables with no problems however, I get this message when I log into the (ADMIN.asp) page

Server Error in Forum Application
An error has occurred while connecting to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_db_connection
File Name:- common.asp

Error details:-
Microsoft OLE DB Provider for SQL Server
Invalid connection string attribute

I searched for Common.asp and right clicked it. It has READ at min. So next is connection String?

I got yarn? but no connection.

Getting closer Watson.

Mike

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Hi all,

Can someone explain it to me why I am getting the following error when I try to connect SQL server express with .NET 2.0?

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 ''. The user is not associated with a trusted SQL Server connection.

Here is my code and i am using windows authentication:

<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SqlClient" %>

<%

Dim connAkaki As SqlConnection
Dim cmdSelectAuthers As SqlCommand
Dim dtrAuthers As SqlDataReader

connAkaki = New SqlConnection("Server=.\SQLEXPRESS;database=akaki")


connAkaki.Open()

cmdSelectAuthers = New SqlCommand("select Firstname from UserTableTest", connAkaki)
dtrAuthers= cmdSelectAuthers.ExecuteReader()


While dtrAuthers.Read()
Response.Write("<li>")
Response.Write(dtrAuthers("Firstname"))

End While

dtrAuthers.Close()
connAkaki.Close()

%>

Have you added the ASP.Net service account as a user in SQL Server? The error message is saying that the current user that is trying to connect has not been registered as a login in SQL Server.|||Hi there,

I was going to reply to your earlier post on the same/similar topic but since this one's newer I will post here.

The username with which the ASP.NET web application runs is different to the username you used to log into the computer with so chances are that the user is not defined in SQL Server's list of logins and so you get problems when using Windows Authentication.

A way around this is to use SQL Server authentication when trying to access your SQL Server. If you do this, your connection string will be:

connAkai = new System.Data.SqlClient.SqlConnection("Server=.\\NATHAN;database=Northwind; User ID=<SQL Server Login>; Password=<Password For Login>");

In a production system you would probably do more to secure that password (i.e. don't place it plain-text in the code) like putting it in the registry or some other methods but as an example I think it will do.

Hope that helps a bit, but sorry if it doesn't

|||

The SQL Server system by default is set to use only Windows Accounts and not SQL Server authentication, you can turn it on but I would leave it as is and use the windows accounts.

With ASP.Net generally the asp.net system by default runs under the Network Service account, to use it in the database you will need to make sure that the Network Service account has permissions for the database that you are using.

Another option is to make the asp.net application that you are working use a different account, this will help to secure your application. One way to do this is to reconfigure the application pool for the asp.net application that you have and make it run under the new account.

|||

Hi All!

How can add the ASP.Net service account as a user in SQL Server 2005?

|||

Huh? An MS Knowledge base article (http://support.microsoft.com/kb/555332) says just the opposite:

RESOLUTION

Change the Authentication Mode of the SQL server from "Windows Authentication Mode (Windows Authentication)"
to "Mixed Mode (Windows Authentication and SQL Server Authentication)".

|||

Steps to change SQLExpress to "SQL Server and Windows Authentication Mode"

If you are lucky to have Microsoft SQL server Management Studio installed, then can browse to the SQL server Instance and right-click to bring up the Server Property. Server Property -> Security -> check "SQL Server and Windows Authentication Mode" option under "Server Authentication" section, and then restart the SQLExpress.

If you don't have Microsoft SQL server Management Studio installed, the if you are running on XP Professional, following SQL statements will do the same:

You have to first login to SQLExpress using osql utility.

USE [master]

GO

EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2

GO

Hope that will help.

Derek

|||

Hey Glen, I have the same problem only I can't get sqlexpress to allow me to logon in SQL Server Auth mode. I can't even logon using my server (in my house). It will let me log on in Windows Authentication but not SQL Server Authentication? I have nothing on this machine and I reininstalled SQL Express twice. I am the sole admin .

All I want to do is create a blank database (which I did) and log onto it. I watched video 7 on microsoft and opened my fireall udp and added me as doadmin. I added sqlbrowser.exe,sqlserver.exe and udp port 1434 for sql via web in windows firewall. I also opened port 1434 on my hardlinksys router which only has port 80 and 1434 udp opened. (Public Webserver not hacked yet). Eventually, I added all permissions for my self (admin). I right clicked on my new database ("WebWizforums") IE not real database name. I added permissions under my user name and granted all permissions.It's only my user name in permissions noone else. I'll tighten ship perms after I see that she works...

Forum software is what I want to try http://www.webwizguide.com/webwizforums/kb/sql_server_install.asp seems real easy but I can't figure it out? MS Access I knew inside and out but now ...no more MSDE or MSJet on Longhorn OS.

Can anyone explain this simple task "Clearly?" Pretend I have no idea what I'm doing .... Smile Thanks Gates for forcing my higher "edgeamycashun."

SQL Express for dummies!

Learning SQL is like filing tax returns...put it off to the last minute!

Mike C

|||

Ok, I triple checked everything then I rebooted....now it works? I guess start and stop will be learned as stupid sql tricks.

ok, I added the database tables with no problems however, I get this message when I log into the (ADMIN.asp) page

Server Error in Forum Application
An error has occurred while connecting to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_db_connection
File Name:- common.asp

Error details:-
Microsoft OLE DB Provider for SQL Server
Invalid connection string attribute

I searched for Common.asp and right clicked it. It has READ at min. So next is connection String?

I got yarn? but no connection.

Getting closer Watson.

Mike

Monday, March 26, 2012

Login failed for user '(null)'...Reasons?

A SQL Server (in another domain) I'm trying to connect to with SQL Server
authentication (UID and password) fails from an Access application. I've
tried a ODBC DSN and a DSN-less connection. The SQL Server is running in
mixed authentication mode.
I can get to the SQL Server with Enterprise Manager, can successfully test
the connection with the DSN in the ODBC Administrator, and can successfully
test the connection via a UDL test (OLEDB)...just not through an Access 2000
application.
Can anyone provide the various possible reasons for...
Connection failed:
SQLState: '28000'
SQL Server Error: 18452
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
user
'(null)'. Reason: Not associated with a trusted SQL Server connection.
...?
Why is the SQL Server receiving a null UID?
Thanks,
JoeIn order for the server to accept the connection attempt it needs to
"authenticate" that the user is some that has rights (user needs the ability
to connect to the \\servername\ipc$ share). This step happens before SQL
Server gets a change to interrogate the credentials. See Books Online
"Authentication Modes" for more detail.
Steve
"JRE" <nomail@.all> wrote in message
news:#FMgYTUAEHA.3316@.TK2MSFTNGP11.phx.gbl...
> A SQL Server (in another domain) I'm trying to connect to with SQL Server
> authentication (UID and password) fails from an Access application. I've
> tried a ODBC DSN and a DSN-less connection. The SQL Server is running in
> mixed authentication mode.
> I can get to the SQL Server with Enterprise Manager, can successfully test
> the connection with the DSN in the ODBC Administrator, and can
successfully
> test the connection via a UDL test (OLEDB)...just not through an Access
2000
> application.
> Can anyone provide the various possible reasons for...
> Connection failed:
> SQLState: '28000'
> SQL Server Error: 18452
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed fo
r user
> '(null)'. Reason: Not associated with a trusted SQL Server connection.
> ...?
> Why is the SQL Server receiving a null UID?
> Thanks,
> Joe
>
>|||Thanks... Proper user accounts exist on both domains in question.
"Steve Thompson" <SteveThompson@.nomail.please> wrote in message
news:%233d64rVAEHA.2484@.TK2MSFTNGP12.phx.gbl...
> In order for the server to accept the connection attempt it needs to
> "authenticate" that the user is some that has rights (user needs the
ability
> to connect to the \\servername\ipc$ share). This step happens before SQL
> Server gets a change to interrogate the credentials. See Books Online
> "Authentication Modes" for more detail.
> Steve
> "JRE" <nomail@.all> wrote in message
> news:#FMgYTUAEHA.3316@.TK2MSFTNGP11.phx.gbl...
Server
test
> successfully
> 2000
>|||On SQL Server, enabled auditing for "failed logins" and see if the accounts
are being rejected by SQL Server.
Security auditing at the server level should indicate if the user account is
failing to get a server connection.
Steve
"JRE" <nomail@.all> wrote in message
news:OmopmQtAEHA.1548@.TK2MSFTNGP12.phx.gbl...
> Thanks... Proper user accounts exist on both domains in question.
> "Steve Thompson" <SteveThompson@.nomail.please> wrote in message
> news:%233d64rVAEHA.2484@.TK2MSFTNGP12.phx.gbl...
> ability
> Server
I've
in
> test
Access
>|||Joe,
See if this thread helps:
http://groups.google.com/groups?q=E...SQLServerTables Do you know
what piece of the Access application is raising the error?
SK
JRE wrote:

>A SQL Server (in another domain) I'm trying to connect to with SQL Server
>authentication (UID and password) fails from an Access application. I've
>tried a ODBC DSN and a DSN-less connection. The SQL Server is running in
>mixed authentication mode.
>I can get to the SQL Server with Enterprise Manager, can successfully test
>the connection with the DSN in the ODBC Administrator, and can successfully
>test the connection via a UDL test (OLEDB)...just not through an Access 200
0
>application.
>Can anyone provide the various possible reasons for...
>Connection failed:
>SQLState: '28000'
>SQL Server Error: 18452
>[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
user
>'(null)'. Reason: Not associated with a trusted SQL Server connection.
>...?
>Why is the SQL Server receiving a null UID?
>Thanks,
>Joe
>
>
>|||Thanks...I checked out the article. That's pretty much what I do to connect
to a SQL Server back end. The error I get is not an Access error. It's
generated by SQL Server.
"Steve Kass" <skass@.drew.edu> wrote in message
news:u$eUJJZBEHA.1544@.TK2MSFTNGP09.phx.gbl...
> Joe,
> See if this thread helps:
> http://groups.google.com/groups?q=E...SQLServerTables Do you know
> what piece of the Access application is raising the error?
> SK
> JRE wrote:
>
test
successfully
2000
>|||Thanks. I'll pass this on to the SQL Server admin.
"Steve Thompson" <SteveThompson@.nomail.please> wrote in message
news:e1yyddtAEHA.1456@.TK2MSFTNGP09.phx.gbl...
> On SQL Server, enabled auditing for "failed logins" and see if the
accounts
> are being rejected by SQL Server.
> Security auditing at the server level should indicate if the user account
is
> failing to get a server connection.
> Steve
> "JRE" <nomail@.all> wrote in message
> news:OmopmQtAEHA.1548@.TK2MSFTNGP12.phx.gbl...
SQL
> I've
running
> in
successfully
> Access
connection.
>|||Joe,
I know the error is a SQL Server error, but I wanted to know at what
point in your Access application that error is raised - is it a specific
line of VB code, is it when a specific form is opened, etc.? Since you
get the error when you run the Access application, there must be a way
to debug the Access application to see exactly at what point the error
occurs, and what Access is doing at that moment.
SK
JRE wrote:

>Thanks...I checked out the article. That's pretty much what I do to connect
>to a SQL Server back end. The error I get is not an Access error. It's
>generated by SQL Server.
>"Steve Kass" <skass@.drew.edu> wrote in message
>news:u$eUJJZBEHA.1544@.TK2MSFTNGP09.phx.gbl...
>
>test
>
>successfully
>
>2000
>
>
>

Login failed for user '(null)'...Reasons?

A SQL Server (in another domain) I'm trying to connect to with SQL Server
authentication (UID and password) fails from an Access application. I've
tried a ODBC DSN and a DSN-less connection. The SQL Server is running in
mixed authentication mode.
I can get to the SQL Server with Enterprise Manager, can successfully test
the connection with the DSN in the ODBC Administrator, and can successfully
test the connection via a UDL test (OLEDB)...just not through an Access 2000
application.
Can anyone provide the various possible reasons for...
Connection failed:
SQLState: '28000'
SQL Server Error: 18452
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
user
'(null)'. Reason: Not associated with a trusted SQL Server connection.
...?
Why is the SQL Server receiving a null UID?
Thanks,
JoeIn order for the server to accept the connection attempt it needs to
"authenticate" that the user is some that has rights (user needs the ability
to connect to the \\servername\ipc$ share). This step happens before SQL
Server gets a change to interrogate the credentials. See Books Online
"Authentication Modes" for more detail.
Steve
"JRE" <nomail@.all> wrote in message
news:#FMgYTUAEHA.3316@.TK2MSFTNGP11.phx.gbl...
> A SQL Server (in another domain) I'm trying to connect to with SQL Server
> authentication (UID and password) fails from an Access application. I've
> tried a ODBC DSN and a DSN-less connection. The SQL Server is running in
> mixed authentication mode.
> I can get to the SQL Server with Enterprise Manager, can successfully test
> the connection with the DSN in the ODBC Administrator, and can
successfully
> test the connection via a UDL test (OLEDB)...just not through an Access
2000
> application.
> Can anyone provide the various possible reasons for...
> Connection failed:
> SQLState: '28000'
> SQL Server Error: 18452
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed fo
r user
> '(null)'. Reason: Not associated with a trusted SQL Server connection.
> ...?
> Why is the SQL Server receiving a null UID?
> Thanks,
> Joe
>
>|||Thanks... Proper user accounts exist on both domains in question.
"Steve Thompson" <SteveThompson@.nomail.please> wrote in message
news:%233d64rVAEHA.2484@.TK2MSFTNGP12.phx.gbl...
> In order for the server to accept the connection attempt it needs to
> "authenticate" that the user is some that has rights (user needs the
ability
> to connect to the \\servername\ipc$ share). This step happens before SQL
> Server gets a change to interrogate the credentials. See Books Online
> "Authentication Modes" for more detail.
> Steve
> "JRE" <nomail@.all> wrote in message
> news:#FMgYTUAEHA.3316@.TK2MSFTNGP11.phx.gbl...
Server
test
> successfully
> 2000
>|||On SQL Server, enabled auditing for "failed logins" and see if the accounts
are being rejected by SQL Server.
Security auditing at the server level should indicate if the user account is
failing to get a server connection.
Steve
"JRE" <nomail@.all> wrote in message
news:OmopmQtAEHA.1548@.TK2MSFTNGP12.phx.gbl...
> Thanks... Proper user accounts exist on both domains in question.
> "Steve Thompson" <SteveThompson@.nomail.please> wrote in message
> news:%233d64rVAEHA.2484@.TK2MSFTNGP12.phx.gbl...
> ability
> Server
I've
in
> test
Access
>|||Joe,
See if this thread helps:
http://groups.google.com/groups?q=E...SQLServerTables Do you know
what piece of the Access application is raising the error?
SK
JRE wrote:

>A SQL Server (in another domain) I'm trying to connect to with SQL Server
>authentication (UID and password) fails from an Access application. I've
>tried a ODBC DSN and a DSN-less connection. The SQL Server is running in
>mixed authentication mode.
>I can get to the SQL Server with Enterprise Manager, can successfully test
>the connection with the DSN in the ODBC Administrator, and can successfully
>test the connection via a UDL test (OLEDB)...just not through an Access 200
0
>application.
>Can anyone provide the various possible reasons for...
>Connection failed:
>SQLState: '28000'
>SQL Server Error: 18452
>[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
user
>'(null)'. Reason: Not associated with a trusted SQL Server connection.
>...?
>Why is the SQL Server receiving a null UID?
>Thanks,
>Joe
>
>
>|||Thanks...I checked out the article. That's pretty much what I do to connect
to a SQL Server back end. The error I get is not an Access error. It's
generated by SQL Server.
"Steve Kass" <skass@.drew.edu> wrote in message
news:u$eUJJZBEHA.1544@.TK2MSFTNGP09.phx.gbl...
> Joe,
> See if this thread helps:
> http://groups.google.com/groups?q=E...SQLServerTables Do you know
> what piece of the Access application is raising the error?
> SK
> JRE wrote:
>
test
successfully
2000
>|||Thanks. I'll pass this on to the SQL Server admin.
"Steve Thompson" <SteveThompson@.nomail.please> wrote in message
news:e1yyddtAEHA.1456@.TK2MSFTNGP09.phx.gbl...
> On SQL Server, enabled auditing for "failed logins" and see if the
accounts
> are being rejected by SQL Server.
> Security auditing at the server level should indicate if the user account
is
> failing to get a server connection.
> Steve
> "JRE" <nomail@.all> wrote in message
> news:OmopmQtAEHA.1548@.TK2MSFTNGP12.phx.gbl...
SQL
> I've
running
> in
successfully
> Access
connection.
>|||Joe,
I know the error is a SQL Server error, but I wanted to know at what
point in your Access application that error is raised - is it a specific
line of VB code, is it when a specific form is opened, etc.? Since you
get the error when you run the Access application, there must be a way
to debug the Access application to see exactly at what point the error
occurs, and what Access is doing at that moment.
SK
JRE wrote:

>Thanks...I checked out the article. That's pretty much what I do to connect
>to a SQL Server back end. The error I get is not an Access error. It's
>generated by SQL Server.
>"Steve Kass" <skass@.drew.edu> wrote in message
>news:u$eUJJZBEHA.1544@.TK2MSFTNGP09.phx.gbl...
>
>test
>
>successfully
>
>2000
>
>
>|||Hi,
Was this resolved by anybody... I have the same problem and I get the
error when I start the index page. My OS is Win2k with SP4, the ASP is
version 5.0 and not. net, SQL is 2000 sp3. My connection string in the
_appStart.asa file is
Connection string in_appStart.asp =
application("sADOConn") ="Provider=SQLOLEDB;" &_
"Initial Catalog=TheMatrix;" &_
"Data Source=sqlServerName;" &_
"Integrated Security=SSPI;"
I believe the problem is something to do with impersonation and I've
read SP4 handles this differently to SP3. The IIS security as you can
see is Windows Authentication enabled so the app knows what domain
account is accessing it and shows details for that account.
Please help!!
Many thanks!
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!|||Hi,
Was this ever resolved.. Have the same problem for my own web app. I get
the error as soon as I launch the app. The connection string is in the
_appstart.asa file and goes like this..
Connection string in_appStart.asp =
application("sADOConn") ="Provider=SQLOLEDB;" &_
"Initial Catalog=TheMatrix;" &_
"Data Source=sqlServerName;" &_
"Integrated Security=SSPI;"
OS is Win2k SP4, ASP is version 5.0 not .net.
When I query the SQL server from my desktop, same place I try to open
the web app, I'm told the system_user is my own domain account.
I'm thinking the problem is to do with how SP4 has changed impersonation
and IIS is set to enable windows authentication. But this is how I
gather what domain user account is accessing the website so they can see
their details. This is the theory but I'm stuck at index page with this
error.
Please help!!
Thanks!!!
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

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

Hi guys,

I have a problem:

I have a created a vb.net app.

From this vb.net App (in server A) I connect to the SQL server SP4 (in serverA) and to a SQLServer 2000 SP4 in another server (server B).
All connection are with trusted_connection = true. Server A and B are in a domain.

After pressed a button, (when I run the button I am logged as a domain administrator) some store procedures and table are created in SQL server A and B.

During this phase everything is OK, I mean tables and store procs are installed correctly, and Linked server are installed.

The problem is that:at the end of this job a store aprocedure (in server B) is called form which has a sql statement (SQL select ...inner join from table in different sql server A,B),
the vb.net app show an error:

"System.Data.SQLClient.SqlExcemption: Login failed for user '(null)'. Reason: Not associated with a trusted SQL server connection"

Linked server is:

Local Login: domain\administrator
Impersonate: true
RMUser and Pw are null
Selected: Be made using the login's current security context

SQL server is win + SQL auth mode.

and account: System Account

Do you know how to solve the problem.

I tried to modify option in Linked server but is the same.

I replaced the conn string in vb.net with user and pass and everything work.
So, it looks like that using windows account credential used are lost.

Any help will be very appreciated

For .NET related questions, please see the Data Access forum in the .NET group.

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

Hello:
I've just upgraded Windows 2000 server to Windows server 2003, and after
this I cannot get to the SQL server Enterprise manager, I'm getting error
"Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection"
I've found many articles about it, but they are all about problems with ASP
or ASP.Net. I don't have a problem with ASP.Net, my Intranet application is
running OK.
I still can get in using SQL server connection if I change the registration
properties, but if I use Trusted connections I get this error. And I need to
use trusted connections.
I would appreciate any help very much.
Thank you,
Peter Afonin
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:uv2RYZTMEHA.2500@.TK2MSFTNGP12.phx.gbl...
> I've just upgraded Windows 2000 server to Windows server 2003, and after
> this I cannot get to the SQL server Enterprise manager, I'm getting error
> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
> I've found many articles about it, but they are all about problems with
ASP
> or ASP.Net. I don't have a problem with ASP.Net, my Intranet application
is
> running OK.
> I still can get in using SQL server connection if I change the
registration
> properties, but if I use Trusted connections I get this error. And I need
to
> use trusted connections.
If you enable auditing on both the server and SQL Server, do you see any
failed login attempts? If so, which account is being used?
Steve
|||"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:uv2RYZTMEHA.2500@.TK2MSFTNGP12.phx.gbl...

> I've just upgraded Windows 2000 server to Windows server 2003, and after
> this I cannot get to the SQL server Enterprise manager, I'm getting error
> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
> I've found many articles about it, but they are all about problems with
ASP
> or ASP.Net. I don't have a problem with ASP.Net, my Intranet application
is
> running OK.
> I still can get in using SQL server connection if I change the
registration
> properties, but if I use Trusted connections I get this error. And I need
to
> use trusted connections.
Moments after I posted the last message, I found this link which may be of
value to you:
How to troubleshoot connectivity issues in SQL Server 2000
http://www.support.microsoft.com/?id=827422
Steve
|||Peter,
CAUSE
This error occurs because the SQL Server is configured to use "Windows only"
authentication.
RESOLUTION
On the SQL Server Security tab, configure SQL Server to use "SQL Server and
Windows" authentication.
Russell Fields
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:uv2RYZTMEHA.2500@.TK2MSFTNGP12.phx.gbl...
> Hello:
> I've just upgraded Windows 2000 server to Windows server 2003, and after
> this I cannot get to the SQL server Enterprise manager, I'm getting error
> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
> I've found many articles about it, but they are all about problems with
ASP
> or ASP.Net. I don't have a problem with ASP.Net, my Intranet application
is
> running OK.
> I still can get in using SQL server connection if I change the
registration
> properties, but if I use Trusted connections I get this error. And I need
to
> use trusted connections.
> I would appreciate any help very much.
> Thank you,
> --
> Peter Afonin
>
|||Thank you, but it's configured this way.
Peter
"Russell Fields" <RussellFields@.NoMailPlease.Com> wrote in message
news:O4mPpDUMEHA.624@.TK2MSFTNGP11.phx.gbl...
> Peter,
> CAUSE
> This error occurs because the SQL Server is configured to use "Windows
only"
> authentication.
> RESOLUTION
> On the SQL Server Security tab, configure SQL Server to use "SQL Server
and[vbcol=seagreen]
> Windows" authentication.
> Russell Fields
> "Peter Afonin" <pva@.speakeasy.net> wrote in message
> news:uv2RYZTMEHA.2500@.TK2MSFTNGP12.phx.gbl...
error[vbcol=seagreen]
SQL[vbcol=seagreen]
> ASP
> is
> registration
need
> to
>
|||Thank you, Steve.
I'm working on it, buy now I even cannot get in with my administrative (sa)
account. I don't know what's wrong.
Peter
"Steve Thompson" <SteveThompson@.nomail.please> wrote in message
news:uD1X1CUMEHA.3596@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> "Peter Afonin" <pva@.speakeasy.net> wrote in message
> news:uv2RYZTMEHA.2500@.TK2MSFTNGP12.phx.gbl...
error[vbcol=seagreen]
SQL[vbcol=seagreen]
> ASP
> is
> registration
need
> to
> Moments after I posted the last message, I found this link which may be of
> value to you:
> How to troubleshoot connectivity issues in SQL Server 2000
> http://www.support.microsoft.com/?id=827422
> Steve
>
|||By chance, did you change the security mode and not restart MSSQLServer
service?
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:OVxnWVUMEHA.2500@.TK2MSFTNGP12.phx.gbl...
> Thank you, Steve.
> I'm working on it, buy now I even cannot get in with my administrative
(sa)[vbcol=seagreen]
> account. I don't know what's wrong.
> Peter
> "Steve Thompson" <SteveThompson@.nomail.please> wrote in message
> news:uD1X1CUMEHA.3596@.tk2msftngp13.phx.gbl...
after[vbcol=seagreen]
> error
> SQL
with[vbcol=seagreen]
application[vbcol=seagreen]
> need
of
>
|||Peter,
Do you get the same error when logging in as 'sa'? If so, that is telling
you that the server is not accepting standard SQL logins, no matter what the
settings seems to be.
Do you have a domain account with sysadmin rights that you can login with?
If so, try that one.
During the upgrade of your server, did you lose any local Windows accounts?
Domain accounts? Look at article:
http://support.microsoft.com/default...b;en-us;307002
Russell Fields
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:OVxnWVUMEHA.2500@.TK2MSFTNGP12.phx.gbl...
> Thank you, Steve.
> I'm working on it, buy now I even cannot get in with my administrative
(sa)[vbcol=seagreen]
> account. I don't know what's wrong.
> Peter
> "Steve Thompson" <SteveThompson@.nomail.please> wrote in message
> news:uD1X1CUMEHA.3596@.tk2msftngp13.phx.gbl...
after[vbcol=seagreen]
> error
> SQL
with[vbcol=seagreen]
application[vbcol=seagreen]
> need
of
>
|||OK. The (null) probably suggests the comment in my other post. (Unless
'sa' is returning a similar message.)
IF in the unlikely event that your registry is messed up:
http://support.microsoft.com/default...b;en-us;285097
Russell Fields
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:uNK2oUUMEHA.3216@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Thank you, but it's configured this way.
> Peter
> "Russell Fields" <RussellFields@.NoMailPlease.Com> wrote in message
> news:O4mPpDUMEHA.624@.TK2MSFTNGP11.phx.gbl...
> only"
> and
after[vbcol=seagreen]
> error
> SQL
with[vbcol=seagreen]
application
> need
>
|||I did restart it, thanks.
Peter
"Steve Thompson" <SteveThompson@.nomail.please> wrote in message
news:e1RnoaUMEHA.1556@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
> By chance, did you change the security mode and not restart MSSQLServer
> service?
> "Peter Afonin" <pva@.speakeasy.net> wrote in message
> news:OVxnWVUMEHA.2500@.TK2MSFTNGP12.phx.gbl...
> (sa)
> after
trusted[vbcol=seagreen]
> with
> application
be
> of
>

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

After an office move (accompanied by IP Address changes), I can no longer
use Windows authentication to connect to one of my SQL Server machines.
Nothing else seems to have changed. This is an example of what I am facing.
For simplicity, I conducted this with Query Analyzer, attempting to connect
via SQL Server authentication and Windows authentication:
SERVER1 --> SERVER2 : Both succeed
SERVER1 --> SERVER3 : Both succeed
SERVER2 --> SERVER1 : Both succeed
SERVER2 --> SERVER3 : Both succeed
SERVER3 --> SERVER1 : Both succeed
SERVER3 --> SERVER2 : SQL Server Authentication succeeds, but Windows
authentication returns: Login failed for user '(null)'. Reason: Not
associated with a trusted SQL Server connection.
Server Specs
============
SERVER1 : SQL2K Enterprise Edition, SP3 (8.00.760) on Windows 2000 Server
SERVER2 : SQL2K Developer Edition, SP3a (8.00.818) on Windows 2000 Server
SERVER3 : SQL2K Developer Edition, SP3a (8.00.818) on Windows Server 2003
Named pipes and TCP/IP are enabled on all three (client and network).
SERVER1 sits in our DMZ; its IP Address did not change. SERVERs 2 & 3 got
new addresses and new DNS entries. None is on a domain.
I have seen similar questions posed here, but have yet to see a suggestion
that resolves my problem. Any ideas?
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
If server2 and serv3 are not on a domain what account are you using to log
on with windows authentication? Are you using pass-thru authentication? If
the user being returned is NULL (as in your case) it means the problem is
outside of sql permissions, this means sql cannot even see what account is
trying to log on to it. One example of how this can happen is this:
Server2 is on Workgroup2 - there is a local account User2 - there is NO
local account User3 on this machine
Server3 is on Workgroup3 - there is a local account User3 - there is NO
local account User2 on this machine
So now if I log on to Server3 as user User3, and then use windows
authentication to connect to server2 this would fail since on the Server2
no account User3 exists, what you would usually see is a login entry in the
SECURITY log on server2 for an account: ANONYMOUS (which by default does
not have permissions into SQL Server).
To troubleshoot this issue I would recommend
1. If you are using PASS-THROUGH authentication (per my example above),
create an account User3 on your Server2 box which has the same name and
password as the user3 account on Server3
2. Enable security account auditing on your Server2 box to see what account
is seen on the Server2 box when you try your windows authentication
connection - I suspect you may see ANONYMOUS or something similar
3. Check these articles as well:
- BOL topic: Security Account Delegation
- You may not be able to connect to a SQL Server that is running on a - ID:
840219
http://support.microsoft.com/?id=840219
- How to troubleshoot connectivity issues in SQL Server 2000 - ID: 827422
http://support.microsoft.com/?id=827422
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx
|||Fany Vargas [MSFT] wrote:
> If server2 and serv3 are not on a domain what account are you
> using to log on with windows authentication?
I am using local accounts on both servers, in which the account name &
password are identical. Recall that SERV2 --> SERV3 is successful with
Windows Authentication, but SERV3 --> SERV2 is not.

> Are you using pass-thru authentication?
I'm not sure what you mean by this. If I select "Windows Authentication"
when connecting (whether in a SQL Server tool or with something like a UDL
file setup), the one direction fails while the other succeeds...

> 1. If you are using PASS-THROUGH authentication (per my example
> above), create an account User3 on your Server2 box which has the
> same name and password as the user3 account on Server3
Aready there...

> 2. Enable security account auditing on your Server2 box to see what
> account is seen on the Server2 box when you try your windows
> authentication connection - I suspect you may see ANONYMOUS or
> something similar
I had actually already tried this. It logs nothing whatsoever, which I
assume means the whole process is aborted before a connection is even
attempted.

> ...You may not be able to connect to a SQL Server that is running...
> http://support.microsoft.com/?id=840219
I was so sure this was going to solve my problem, as it describes it
precisely. Unfortunately, the resolution therein does not help me connect.
In hindsight, I suppose I should not have expected it to help, as my problem
arose after the physical (and network) move. In other words, since Local
Security Policy was not a hurdle before the problem began, why should it be
the cause of the problem?
Is it possible I am merely correlating the network changes with this?
Perhaps a recent Windows Update plays a part...

> - How to troubleshoot connectivity issues in SQL Server 2000 - ID:
> 827422 http://support.microsoft.com/?id=827422
This was actually my starting point. I have no idea where to go from here.
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
|||1. I can see you are indeed using Pass-through authentication (this means
you are using a local account with same name and pwd to authenticate) .
You should be seeing an entry in the security log. Can you ensure that the
security policy to enable auditing has been set? If there is a group policy
defined (there should not be if its in a workgroup) then this would
override your local security policy. Also, you can you enable security
auditing on the sql server itself (see BOL topic: SQL Server Properties
(Security Tab))
2. Are you able to connect from some OTHER client? Or do trusted
connections to SRV2 fail from ALL clients?
from your description it seems that trusted connections work from all other
clients except SRV3
3. What is the startup account of the SQL Service account is it the local
administrator account? If not, try setting it to local admin and test your
connection.
4. On SRV3 try creating an LMHOST entry for SRV2, are you now able to
connect with trusted auth?
5. Can you create a new account TESTACCOUNT on both SRV2 and SRV3 (with
same password) and see if you can use pass through authentication with
these new accounts (the issue may be account specific)
6. When connecting to SRV2 specify the IP address rather than the network
name - does it now work?
7. Check if the account has "impersonate client after authentication" right
on SRV2 - try for both sql service account and the account trying to log on
8. This error usually refers to security issues. Essentially SQL server is
unable to get information about the NT account that you are trying to use
to connect to it. The fact that you are not seeing an entry in the security
log hints to this as well. You may also want to try running a netmon trace
to see if we ever establish a connection to sql.
9. Does the account have "Access this computer from the network" rights? If
not try adding this right and retry your connection
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx
|||First I'd like to thank you for all of your help - my problem is solved. My
comments (and a question) are inline:
Fany Vargas [MSFT] wrote:
> 1. I can see you are indeed using Pass-through authentication (this
> means you are using a local account with same name and pwd to
> authenticate) . You should be seeing an entry in the security log.
> Can you ensure that the security policy to enable auditing has been
> set? If there is a group policy defined (there should not be if its
> in a workgroup) then this would override your local security policy.
> Also, you can you enable security auditing on the sql server itself
> (see BOL topic: SQL Server Properties (Security Tab))
The security log mirrors my specific error message - once per connection
attempt. None of the policy settings in KB:840219 helped, though this was
not really a surprise, given that only one direction was failing (of the 6
possible between 3 servers), not to mention the fact that this connectivity
problem is new, and I am unaware of recent changes to the policies on either
machine.

> 2. Are you able to connect from some OTHER client? Or do trusted
> connections to SRV2 fail from ALL clients?
> from your description it seems that trusted connections work from all
> other clients except SRV3
Not only that, but trusted connections TO all other servers were fine from
that machine...

> 3. What is the startup account of the SQL Service account is it the
> local administrator account? If not, try setting it to local admin
> and test your connection.
Local System. Changing it had no effect.

> 4. On SRV3 try creating an LMHOST entry for SRV2, are you now able to
> connect with trusted auth?
No.

> 5. Can you create a new account TESTACCOUNT on both SRV2 and SRV3
> (with same password) and see if you can use pass through
> authentication with these new accounts (the issue may be account
> specific)
Different accounts did not matter.

> 6. When connecting to SRV2 specify the IP address rather than the
> network name - does it now work?
> 7. Check if the account has "impersonate client after authentication"
> right on SRV2 - try for both sql service account and the account
> trying to log on
> 8. This error usually refers to security issues. Essentially SQL
> server is unable to get information about the NT account that you are
> trying to use to connect to it. The fact that you are not seeing an
> entry in the security log hints to this as well. You may also want
> to try running a netmon trace to see if we ever establish a
> connection to sql.
> 9. Does the account have "Access this computer from the network"
> rights? If not try adding this right and retry your connection
Suffice it to say that I tried all of the above, without solution. Then I
came back the next day and demonstrated the problem to one of our network
guys, and as I walked him through all of the steps I took to show the
different error messages, I got it to work by setting up an alias to use
Named Pipes.
Now, this was one of the first steps I took, as it was the natural place to
start, and I revisited it several times through this ordeal. But it never
led to resolution until Friday. I also noticed on Friday that I could again
map network drives by name rather than IP Address -- I had been getting the
"duplicate name exists on the network" error**
In the end, I am left wondering if this was just some WINS artifact or
something. Is this possible? And even if it were, why would Windows
Authentication fail over IP, but succeed over named pipes?
**Recall that the IP Address changed on both machines. But this drive
mapping error was not preventing Windows Authentication from other machines.
Furthermore, success at drive mapping by IP Address was not paired with
success at SQL Server connection by IP Address.
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
|||If named pipes worked and TCP did not (assuming that SQL was indeed
listening on TCP) then it may be an Kerberos - SPN issue. You may have a
duplicate or invalid SPN. To see the list of SPN's you can use the SETSPN
utility
(http://www.microsoft.com/downloads/d...31fd-ab77-46a3
-9cfe-ff01d29e5c46&displaylang=en). However, SPN's should only apply in a
domain environment not a workgroup environment. Let us know if you get any
results when running setspn -L ...
See these references:
* BOL Topic: Security Account Delegation
* PRB: Setspn Fails if Domain Name Differs from NetBIOS Name Where SQL -
ID: 277658 - http://support.microsoft.com/?id=277658
* INF: SQL Server 2000 Kerberos support including SQL Server virtual - ID:
319723 (available at http://support.microsoft.com)
* You receive a "Cannot generate SSPI context" error message when you use -
ID: 824402 (available at http://support.microsoft.com)
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Dave Anderson wrote:
> After an office move...
> SERVER1 --> SERVER2 : Both succeed
> SERVER1 --> SERVER3 : Both succeed
> SERVER2 --> SERVER1 : Both succeed
> SERVER2 --> SERVER3 : Both succeed
> SERVER3 --> SERVER1 : Both succeed
> SERVER3 --> SERVER2 : SQL Server Authentication succeeds, but Windows
> authentication returns: Login failed for user '(null)'. Reason: Not
> associated with a trusted SQL Server connection...
One final footnote: I believe I now know the cause of this problem. When we
moved offices, we also consolidated offices. That is to say that groups from
several facilities are now housed at the same place, with a single LAN. And
one of the groups from a different facility brought along a machine with the
same MACHINE NAME as SERVER2 (though ours had the DNS entry).
This appears to be the cause of the "duplicate name" problem with mapping
drives, and is most likely the cause of our SQL Server authentication
nightmares.
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.