.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

NT AUTHORITY\ANONYMOUS LOGON occured in Sharepoint with entity framework

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :SharePoint

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 ???

View Complete Post

More Related Resource Links


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

SharePoint 2010 and Entity framework 4.0

Hi all, we are thinking of using ef4 along with one of our SharePoint 2010 projects, i have realized that SharePoint 2010 targets the 2.0 CLR and EF uses the latest 4.0, CLR has anyone come across this issue ???

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

Can I utilize .Net 4.0 and its Entity framework to build application that run on SharePoint 2010?



Can I utilize .Net 4.0 and Entity framework to build application that run on SharePoint 2010?


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

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Creating a Generic Entity Framework 4.0 Repository

With .NET 4.0 right around the corner, I thought it would be cool to download Visual Studio 2010 beta 2 and start playing around with the next release of Entity Framework.

The initial release of Entity Framework came with a great deal of criticism. To make matters worse, there was a large uproar when it was rumored that Microsoft would be abandoning LINQ to SQL, in favor of Entity Framework. This was because, at the time, many developers felt Entity Framework was an inferior technology to LINQ to SQL. To set things right, Microsoft proactively moved forward with improving Entity Framework, in time for the 4.0 release of the .NET Framework. This is good news because my initial impressions, so far, have been nothing but positive.

ASP.NET 4.0 Dynamic Data and Many to Many Entity Framework Entities

I did not play much with Dynamic Data controls in VS2008 and just made a cool discovery in VS2010 Beta 2. This may not even be new, but as I'm sitting 30,000+ feet over the Atlantic ocean, I don't have access to VS2008 at the moment to check.

Entity Framework 4 Tips for WinForms Development

I've been recently working on a smart client (WinForms) application backed by Entitiy Framework 4 (EF4) on Visual Studio 2010. In this blog post I will try to give you some tips regarding some limitations and points to be careful about EF4.

Data accessors or Entity framework


The entlib 5 sugest me to use with data accessors for mapping data from database to my data objects (ORM).

But in .NET 3.5 and especially in .NET 4, I can use in entity framework as ORM methodology for data objects.

What data accessors uses advantages over the entity framework?

What differences that should be affect on my using decisions?

Data Points: Deny Table Access to the Entity Framework Without Causing a Mutiny


Julie Lerman shows database administrators how to limit access to databases from the Entity Framework by allowing it to work only with views and stored procedures instead of tables-without impacting application code or alienating developers.

Julie Lerman

MSDN Magazine August 2010

VS 2010: Entity Framework 4.0 and WCF Data Services 4.0 in Visual Studio 2010


Elisa Flasko takes you through a sample weblog application to demonstrate how new improvements in Entity Framework and WCF Data Services work together to simplify the way data is modeled, consumed and produced in Visual Studio 2010.

Elisa Flasko

MSDN Magazine April 2010

N-Tier Apps and the Entity Framework: Building N-Tier Apps with EF4


This article is the third in a series about n-tier programming with the Entity Framework, specifically about building custom Web services with the Entity Framework and WCF. This article looks at features coming in the second release of the Entity Framework (EF4) and how you use them to implement the Self-Tracking Entities and Data Transfer Objects (DTOs) n-tier patterns.

Daniel Simmons

MSDN Magazine November 2009

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