473,513 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON

Hi,
I'm having problems with good old error... Login failed for user 'NT
Authority\Anonymous logon'.

The default web page comes up fine, but when the user attempts to log in
(which checks stored usernames in the database etc) then the error occurs.

a) The Web server is on a seperate box to SQL Server.
b) I'm using forms authentication.
c) I've enabled anonymous access, setting it to the correct domain account,
and am not allowing IIS to control the password.
d) The specific domain account has been granted the correct permissions in
sql server

e) web.config file is basically as follows..

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Forms" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<identity impersonate="true" />
<trace enabled="false" requestLimit="100" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
<appSettings>
<add
key="DBConnectionString"
value="server=servername;database=mydb;Integrated Security=SSPI"/>
</appSettings>
</configuration>

It works fine from the web server.

If anyone has any ideas, this would be most appreciated.

Also (not sure if this will help me or not), how can I tell which user the
aspnet worker process is running under?

Many thanks.

--
Many thanks.
:)
Nov 19 '05 #1
4 3479
Use this short file I wrote :

identity.aspx
-----------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsIdentity.GetCurrent.Name()</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
-------------

That will return the user the aspnet worker process is running under.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Buggyman" <Bu******@discussions.microsoft.com> wrote in message
news:75**********************************@microsof t.com...
Hi,
I'm having problems with good old error... Login failed for user 'NT
Authority\Anonymous logon'.

The default web page comes up fine, but when the user attempts to log in
(which checks stored usernames in the database etc) then the error occurs.

a) The Web server is on a seperate box to SQL Server.
b) I'm using forms authentication.
c) I've enabled anonymous access, setting it to the correct domain account,
and am not allowing IIS to control the password.
d) The specific domain account has been granted the correct permissions in
sql server

e) web.config file is basically as follows..

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Forms" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<identity impersonate="true" />
<trace enabled="false" requestLimit="100" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
<appSettings>
<add
key="DBConnectionString"
value="server=servername;database=mydb;Integrated Security=SSPI"/>
</appSettings>
</configuration>

It works fine from the web server.

If anyone has any ideas, this would be most appreciated.

Also (not sure if this will help me or not), how can I tell which user the
aspnet worker process is running under?

Many thanks.

--
Many thanks.
:)

Nov 19 '05 #2
You can find the account that the web app is running under by looking in the
'Identity' tab of the relevant 'Application Pool' within IIS 6. Try
allowing this access to your SQL server
"Buggyman" <Bu******@discussions.microsoft.com> wrote in message
news:75**********************************@microsof t.com...
Hi,
I'm having problems with good old error... Login failed for user 'NT
Authority\Anonymous logon'.

The default web page comes up fine, but when the user attempts to log in
(which checks stored usernames in the database etc) then the error occurs.

a) The Web server is on a seperate box to SQL Server.
b) I'm using forms authentication.
c) I've enabled anonymous access, setting it to the correct domain
account,
and am not allowing IIS to control the password.
d) The specific domain account has been granted the correct permissions in
sql server

e) web.config file is basically as follows..

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Forms" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<identity impersonate="true" />
<trace enabled="false" requestLimit="100" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
<appSettings>
<add
key="DBConnectionString"
value="server=servername;database=mydb;Integrated Security=SSPI"/>
</appSettings>
</configuration>

It works fine from the web server.

If anyone has any ideas, this would be most appreciated.

Also (not sure if this will help me or not), how can I tell which user the
aspnet worker process is running under?

Many thanks.

--
Many thanks.
:)

Nov 19 '05 #3
Second thoughts ( besides finding out the process account user ) :

re:
I've enabled anonymous access, setting it to the correct domain account,
Was that account NT Authority\Anonymous
.... or YourWebServerName\Anonymous ?

re: The specific domain account has been granted
the correct permissions in sql server
Was that account NT Authority\Anonymous
.... or YourWebServerName\Anonymous ?

re: <identity impersonate="true" />
Since you *are* impersonating, it's the account that ASP.NET
is using as impersonation the one which needs permissions
everywhere.

That means the local user permissions, the SQL Server, etc.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Buggyman" <Bu******@discussions.microsoft.com> wrote in message
news:75**********************************@microsof t.com... Hi,
I'm having problems with good old error... Login failed for user 'NT
Authority\Anonymous logon'.

The default web page comes up fine, but when the user attempts to log in
(which checks stored usernames in the database etc) then the error occurs.

a) The Web server is on a seperate box to SQL Server.
b) I'm using forms authentication.
c) I've enabled anonymous access, setting it to the correct domain account,
and am not allowing IIS to control the password.
d) The specific domain account has been granted the correct permissions in
sql server

e) web.config file is basically as follows..

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Forms" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<identity impersonate="true" />
<trace enabled="false" requestLimit="100" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
<appSettings>
<add
key="DBConnectionString"
value="server=servername;database=mydb;Integrated Security=SSPI"/>
</appSettings>
</configuration>

It works fine from the web server.

If anyone has any ideas, this would be most appreciated.

Also (not sure if this will help me or not), how can I tell which user the
aspnet worker process is running under?

Many thanks.

--
Many thanks.
:)

Nov 19 '05 #4
Background info on this whole process is at :

http://msdn.microsoft.com/library/de...SecNetch12.asp

Make sure you read it...

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Second thoughts ( besides finding out the process account user ) :

re:
I've enabled anonymous access, setting it to the correct domain account,


Was that account NT Authority\Anonymous
... or YourWebServerName\Anonymous ?

re:
The specific domain account has been granted
the correct permissions in sql server


Was that account NT Authority\Anonymous
... or YourWebServerName\Anonymous ?

re:
<identity impersonate="true" />


Since you *are* impersonating, it's the account that ASP.NET
is using as impersonation the one which needs permissions
everywhere.

That means the local user permissions, the SQL Server, etc.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Buggyman" <Bu******@discussions.microsoft.com> wrote in message
news:75**********************************@microsof t.com...
Hi,
I'm having problems with good old error... Login failed for user 'NT
Authority\Anonymous logon'.

The default web page comes up fine, but when the user attempts to log in
(which checks stored usernames in the database etc) then the error occurs.

a) The Web server is on a seperate box to SQL Server.
b) I'm using forms authentication.
c) I've enabled anonymous access, setting it to the correct domain account,
and am not allowing IIS to control the password.
d) The specific domain account has been granted the correct permissions in
sql server

e) web.config file is basically as follows..

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Forms" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<identity impersonate="true" />
<trace enabled="false" requestLimit="100" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
<appSettings>
<add
key="DBConnectionString"
value="server=servername;database=mydb;Integrated Security=SSPI"/>
</appSettings>
</configuration>

It works fine from the web server.

If anyone has any ideas, this would be most appreciated.

Also (not sure if this will help me or not), how can I tell which user the
aspnet worker process is running under?

Many thanks.

--
Many thanks.
:)


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
9170
by: cerilocke | last post by:
I have an identical SQL database on two machines (my machine and a web server) that links to a database on a third server (S3). When I execute a stored procedure on my machine that accesses a...
3
3441
by: Mike Hutton | last post by:
Hi, I have tried to keep things simple. Not simple enough, obviously. I have a set of intranet ASP.NET pages which access a SQL back-end through the normal SQLConnection stuff. I want to use...
3
3081
by: Maellic | last post by:
Hi, The website I am working on is built with ASP.NET and connects to a SQL Server 2000 database. The web server and database are on the same machine. I have recently tried to modify the timeout...
10
4484
by: et | last post by:
I have an asp.net program that uses a connection string, using integrated security to connect to a sql database. It runs fine on one server, but the other server gives me the error that "Login...
4
1816
by: Chuck Bowling | last post by:
I'm having a problem that i really don't understand. I'm new to ASP.NET and to SQL Server (MSDE). I'm trying to get a VS walkthru in the C# to work. I think the problem is permissions but I'm not...
2
27970
by: Andrzej Magdziarz | last post by:
Hello, (sorry for my English...) Could you help me with a SQL Server 2005 problem? I had installed SQL Server 2005 and then I tried to setup some application using SQL Server. Unfortunatelly...
3
1160
by: SAL | last post by:
Hello, I'm a total asp.net newbie. I'm developing a web app and on my machine I login to a sql server just fine using NT Authentication via the connection string as: Integrated Security=True ...
3
6258
by: gderosa | last post by:
I have been getting that dreaded error in my application: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. I have had my application in the test environment, impersonating it using a...
4
12062
by: eruth | last post by:
There are loads of post on this, but nothing that seems to cover my exact problem ;) I have an ASP.Net 1.1 web application running on my local machine. I want to connect to an SQL 2005 server...
1
3954
by: cactuscrust | last post by:
I'm running IIS6 Windows2003, and as you'll see very quickly.. I'm pretty new to this stuff. Lately I've been getting bombarded with login attempts.... sometimes several in the same second, and it...
0
7257
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7379
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.