.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links


Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
Hello everybody, I have this scenario. We on application server and sql server Web application server contains following thinks: IIS 7.0 Windows Server 2008 ASP.net 2.x Sql server: Windows Server 2008 SQL Server 2008 My web application uses following connection string: <add name="AdventureWorksDW2008" providerName="System.Data.SqlClient" connectionString="Data Source=xxx.xx.xx.xx;Initial Catalog=databasename;Integrated Security=SSPI; I got  this error message: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. 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 'NT AUTHORITY\ANONYMOUS LOGON'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SqlException (0x80131904): Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.] Geospatial.Data.DALMap.GetCountries() in C:\Project\old\Geospatial Framework\Geospatial Framework\Geospatial Framework\Data\DALM

View Complete Post

More Related Resource Links

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'



We are building a web part to fetch data from SQL Server. The Sharepoint application and SQL database are on two different servers. But when i am trying to access the database from the web part it gives the following error

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

 Sharepoint site details:

Windows authentication enabled

IIS->Application Pool Identity,IIS->website->Directory security,crediantial used to access the database ,are same
 (administrator Crediantials)

Any help regarding this issue will be greatly appreciated.




Hi, I have an page that runs in the central administration site, and it creates a database.  The way this works is you enter the name of the server, and then you click create database, and it is supposed to go to that server and create the database.  This works fine on a stand-alone server, but on a farm, it is failing if I use an Integrated Security=SSPI connection string, and giving the error of "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'."  If I instead use an sql authentication connection string, it works fine.  Can someone explain to me what is going on?  Shouldn't this work fine since sharepoint is able to connect to the sql server?
my blog - Tea Time with Meowkins

NT AUTHORITY\ANONYMOUS LOGON occured in Sharepoint with entity framework


Hey Guys

Im a rookie Sharepoint Developer.

I will develop a Sharepoint VisualWebpart in our SP 2010.
This Webpart show me data from the SQL Server (SP2010 Server is not the same).

I select the data with the entity framework an display this on page!

Ok fine... Now its an error occured : Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

I search the internet for a solution.... What i found is : Use kerberos for "second hop" applications.

is this the right solution for my problem ???

Connecting to MSDB store: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'



I'm trying to connect to SQL MSDB store using ADO.Net SQLConnection class in the windows authentication mode using c#. 

Connection string I'm using is "Data Source=datasource; Initial Catalog=msdb; Integrated Security=True".

When the control reaches connection.open() in the code, it errors out with the message

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

I made sure that I'm an admin on the SQL machine and my 'user' object is mapped to MSDB db .

Any suggestions?





Hi All,

 my SQL 2005 cluster server i'm getting login failed error message.


0000: 18 48 00 00 0e 00 00 00   .H......

0008: 0e 00 00 00 49 00 43 00   ....I..

0010: 54 00 2d 00 53 00 51 00   T.-.S.Q.

0018: 4c 00 44 00 42 00 56 00   L.D.B.

0020: 53 00 30 00 31 00 00 00   S.0.1...

0028: 07 00 00 00 6d 00 61 00   ....m.a.

0030: 73 00 74 00 65 00 72 00   s.t.e.r.

0038: 00 00                     ..      




For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.





Event Id = 18456


[CLIENT:] is my internal moss server ip address. error message is keep on continue each and every minutes. Currently i don't have any application issues. i want to know why i'm getting this error on my sql node.


i know if i disable the cluster server security login audits , this event log will not appear in event viewer. i need a solution why i'm getting error. i like to resolve this issue.

Linked server fails -Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. with SQL2008R2


Hi, Kerberos seems to be malfunctioning with SQL2008R2.


I have a new dev SQL2008R2 server called BDSDEV2 and an upgraded(in-place) SQL2008R2 server BDSTEST2.

From BDSDEV2 , I can successfully issue a linked server query to BDSTEST2

select * from bdstest2.eis_prod.dbo.wcs_agent


But from my client in SSMS, connected to BDSDEV2  , the double hop is failing to BDSTEST2 for same query 

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


I have another BDSDEV1 server, which is SQL2008 and there double hop IS WORKING

From my client in SSMS, connected to BDSDEV1  ,I can successfully issue the query to BDSTEST2 .


The service accounts  for MSSQLSERVER are both local admins on their servers and sa's

I have confirmed SPN is OK 

This is from BDSDEV2 - sql2008r2 server.

C:\Program Files (x86)\Resource Kit>setspn -L tsqlssvc

Registered ServicePrincipalNames for CN=TSQLSSVC,OU=SvcAcct,DC=corp,DC=saif,DC=c


'IIS' & 'Kerberos' + SQL Login Failure for user 'NT AUTHORITY\ANONYMOUS LOGON'


Hi all,

Have spent hours and hours trying to work out what is goin on with this issue and i still cant figure it out.

Hopefully someone here will be able to help.

A few details to start with...

Win Server 2003 x64

SQL Server 2008

SQL RS 2008


Server A

SQL Server

Reporting Services


Server B

Reporting Services


Server B is scaled out and joined to reportserver DB of Server A.

ASP on both servers. Some apps only run on server B

Server B IIS workgroup ID is running under a domain account.


Kerberos Authentication is enabled.


I am showing intermittant errors in the RS logs stating that a connection cannot be made to a particular database, using login 'NT AUTHORITY\ANONYMOUS LOGON' even though anonymous logons are disabled in IIS.


SQL Server logs state this error as....

Date        19/05/2011 11:11:36
Log        SQL Server (Current - 19/05/2011 11:11:00)

Source        Logon

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Reason: Token-based server access

sqlcmd - linkedserver - ALL queries fails after FIRST error from remote server - ANONYMOUS LOGON

Hello, I have very strange problem with sqlcmd , it stop working after first error returned from remote sql server (like permission denied), lets try show what I'm doing, configuration is quite simple C- client (windows 2003 x64, standalone sqlcmd client sp3) S1 - server1(windows 2003 x64, sql 2005 sp3) S2 - server2 (windows 2003 x64, sql 2005 sp3) I need connect via middle Linked Server (S1) from C to to S2, each machines have the same LOCAL Windows account C\LSUser, S1\LSUser, S2\LSUser with the same password, LSUser is not domain account, linked server is configured for Windows Account Impersonation (checked Impersonate) Example, query executed from client C: 1>exec [LS1].[DB].[dbo ].[ListTab1]; - works well, no problem 1>exec [LS1].[DB].[dbo ].[ListTab2]; - works well, no problem ok , now try modify permission on S2, I explicitly deny execute procedure [DB].[dbo ].[ListTab1] on S2 to S2\LSUser, 1>exec [LS1].[DB].[dbo ].[ListTab1]; Msg 229, Level 14, State 5, Server S2, Procedure ListTab1, Line 1 The EXECUTE permission was denied on the object 'ListTab1', database 'DB', schema 'dbo'. expected message :), but look now: 1> exec [LS1].[DB].[dbo ].[ListTab2]; Msg 18456, Level 14, State 1, Server S2, Line 1 Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. all remote queries STOP working from client C 1> select top 10 * from [L

Anonymous Logon in SSAS 2008


Hello guys,


I'm using SQL Server Analysis Services 2008 R2 and Windows Server 2008 R2..

How to connect with ANONYMOUS LOGON to my analysis databases?


I tried to read similar articles, but i haven't found any clear answers...


Best regards and thanks,

Roland Andreas

What is causing these Login failed for ANONYMOUS LOGON errors?


I have a SQL 2005 SP3 cluster running on Veritas Cluster Server (Storage Foundation HA 5.1 SP1).

The cluster has 2 nodes and is configured with 2 SQL Instances running on seperate virtual servers.

The only SQL services installed on each instance/server is Database Services, each instance has the following SQL Services - SQL SERVER (instancename ), SQL Server FullText Search (instancename ) and SQL Server Agent (instancename ).

We are seeing seemingly random occurances of the error below in the logs for each instance, the client ipaddress specified is that of the alternate cluster node (i.e the server not running the instance):

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [CLIENT: ipaddress ]

This error is preceeded by Error: 18456, Severity: 14, State: 11

These errors are appearing in the logs for both instances.

Having read several articles/discussions regarding this error I see it is commonly related to kerberos/IIS/Reporting services and such, however we are not using any of these services, furthermore the instances are currently empty - hosting nothing but the default system databases.

For both instances all SQL services are running as a named domain user account, there are no SQL processes running as SYSTEM users.

Can anyone give any indication as to

Tuples, Anonymous Types, and Concrete Types

Tuples can save you a great deal of repetitive tasks. They can also lead to completely unreadable code in a language like C#. Tuples are data values that contain N items. The .NET framework supports tuples containing 1 to 8 members. To use tuples with more than 8 members, you use another tuple for the member of an octtuple

C#: Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes


In this article Juval Lowy describes how exciting new features in Visual Studio 2005, that will improve your overall productivity compared to the first version of C#, so you can write cleaner code faster.

Juval Lowy

MSDN Magazine Visual Studio 2005 Guided Tour 2006

C# 2.0: Create Elegant Code with Anonymous Methods, Iterators, and Partial Classes


C# 2.0 introduces a wealth of exiting new features, such as generics, iterators, partial classes and anonymous methods. While generics are the most talked-about feature especially for former classic C++ developers, the rest of the new features are important additions to your .NET development arsenal, enhancing power and improving overall productivity. This article is dedicated to all the new C# 2.0 capabilities besides generics to give you a good overall picture of the upcoming features.

Juval Lowy

MSDN Magazine May 2004

Anonymous Web Site receives "The request failed with HTTP status 401: Unauthorized"


I set up a test website on my local box and was able to access sharepoint search using the querySearch web service from SP.  After I got it all working properly I transferred the code to the target website that is set up with anonymous access for all people on the fab floor.  However from this website I keep getting the 401 error.  It can't be SP because the same code worked from my local website "localhost".  Any suggestions?  we don't want to have to have the fab people log in so we can't not have the box anonymous.  I would appreciate any suggestions very much!!!

Using WSS 2007 with MOSS.


  private void GetDefaultCredentials()
      m_where = "get configuration data for credentials";
      string userid = ConfigurationManager.AppSettings[ "userid" ];
      string password = ConfigurationManager.AppSettings[ "password" ];
      string domain = ConfigurationManager.AppSettings[ "domain" ];

      m_where = "set search query credentials";
      m_query.Credentials = new NetworkCredential ( userid, password

Unablke to logon on Sharepoint 2007 front-end with remote IE8 client


We are having problems to logon on the sharepoint front-end server from a client pc, within the same network. The Sharepoint 2007 servers are running on WIndows 2008 Datacenter (2 Front ends, 1 index, 1 SQL database 2008 server).

When we try to logon the server creates an event with id 4625, status: 6d, sub-status: 6a. When we use the same account from IE 8.0 on one of the servers within the farm, then it works.

The same configuration is installed within another environment where evereything works.

Is there somebody that solved this issue??

Add a logon to SharePoint web site


We are running SharePoint 2007 on Windows 2003 server. We would like to add the VeriSign seal or logo on left pane of each SharePoint page. Please refer to this screenshot: http://www.chicagotech.net/images/sharepoint22.gif

Can you give step by step instruction or refer to a link?

Bob Lin, MS-MVP Networking, Internet, Routing, VPN Troubleshooting on


How to Setup Windows, Network, VPN & Remote Access on


Error: 18456, Severity: 14, State: 16 Login failed for user 'NT AUTHORITY\SYSTEM'

Hi,   can someone help me with this error. Error: 18456, Severity: 14, State: 16 Login failed for user 'NT AUTHORITY\SYSTEM' [CLIENT:<local machine>] I've found several Threads but not with the NT AUTHORITY\SYSTEM.   Thanks for help.   Jens
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend