473,327 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

NT Authority/ANONYMOUS LOGIN problem, only wierder

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 peoples' NT
logons to user-stamp data changes made through the web-pages. So it
seemed obvious to use Windows authentication to access SQL
connections.

On my development box (running ASP.NET 1.1, with Anonymous Login
disabled and Windows authentication), my pages work fine.

I have copied all the files over to a development web server (did I
need to compile them on the web server? - I guessed not). This web
server has the same web site setup, with Anonymous Login disabled, and
Windows authentication.

On both boxes I have set impersonate="true" in the web.config.

The whole lot is using Windows 2000 (server on the test server), with
sp3. The SQL box is also W2k with sp3, and all are on the same
network.
If I start up the web pages from my development box, and access the
pages on the test server, I get access problems when opening SQL
connections:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Stack trace (for those who want to see it):
************************************************** ****************
[SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString
options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
BusinessPlans.Reference.GetSelectSQL(String p_ConnStr, String
p_SPName, String p_TableName, String p_ResultParamName) +66
BusinessPlans.Reference.PopulateDataGrids(Boolean p_ApplyMask,
Boolean p_AddNewItem) +521
BusinessPlans.Reference.ShowTable(Object sender, CommandEventArgs e)
+74
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e)
+110
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +1277
************************************************** ****************

BUT...

in the same session I have the following set up as well:

Authentication name=MyDomain\MyLogin,
Authentication type=NTLM
Authentication passed=True

I don't see what I'm doing wrong here.

BUT...

things get even wierder when I access the pages from the test server
itself. They all work OK, and if I immediately go back and try to
access them from my development box again, they work fine!

!!!!

What is going on? The errors return if I leave the connections for a
number of minutes (presumably because the connections/sessions
time-out), the errors return. Is it failing to set up a pooled
connection on the remote server (and if so, why?) or is it something
even more obscure?

Help!

Any help would be most gratefully received.

Mike.
Nov 17 '05 #1
3 3430
this scenario will not work, as any search of this newsgroup will tell you.
you can not forward nt creditals. you have three choices

1) switch to a credital format that will forward, by using basic or digest
authentication.
2) put the sql server on the same box as the web server (no forwarding
required)
3) fill in the username and password in the web config, and pass in the user
credials though another method to the sqlserver.

for more details, google this newsgroup.

-- bruce (sqlwork.com)

"Mike Hutton" <hu************@hotmail.com> wrote in message
news:70**************************@posting.google.c om...
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 peoples' NT
logons to user-stamp data changes made through the web-pages. So it
seemed obvious to use Windows authentication to access SQL
connections.

On my development box (running ASP.NET 1.1, with Anonymous Login
disabled and Windows authentication), my pages work fine.

I have copied all the files over to a development web server (did I
need to compile them on the web server? - I guessed not). This web
server has the same web site setup, with Anonymous Login disabled, and
Windows authentication.

On both boxes I have set impersonate="true" in the web.config.

The whole lot is using Windows 2000 (server on the test server), with
sp3. The SQL box is also W2k with sp3, and all are on the same
network.
If I start up the web pages from my development box, and access the
pages on the test server, I get access problems when opening SQL
connections:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Stack trace (for those who want to see it):
************************************************** ****************
[SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
BusinessPlans.Reference.GetSelectSQL(String p_ConnStr, String
p_SPName, String p_TableName, String p_ResultParamName) +66
BusinessPlans.Reference.PopulateDataGrids(Boolean p_ApplyMask,
Boolean p_AddNewItem) +521
BusinessPlans.Reference.ShowTable(Object sender, CommandEventArgs e)
+74
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e)
+110
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.Rai
sePostBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +1277
************************************************** ****************

BUT...

in the same session I have the following set up as well:

Authentication name=MyDomain\MyLogin,
Authentication type=NTLM
Authentication passed=True

I don't see what I'm doing wrong here.

BUT...

things get even wierder when I access the pages from the test server
itself. They all work OK, and if I immediately go back and try to
access them from my development box again, they work fine!

!!!!

What is going on? The errors return if I leave the connections for a
number of minutes (presumably because the connections/sessions
time-out), the errors return. Is it failing to set up a pooled
connection on the remote server (and if so, why?) or is it something
even more obscure?

Help!

Any help would be most gratefully received.

Mike.

Nov 17 '05 #2
this scenario will not work, as any search of this newsgroup will tell you.
you can not forward nt creditals. you have three choices

1) switch to a credital format that will forward, by using basic or digest
authentication.
2) put the sql server on the same box as the web server (no forwarding
required)
3) fill in the username and password in the web config, and pass in the user
credials though another method to the sqlserver.

for more details, google this newsgroup.

-- bruce (sqlwork.com)

"Mike Hutton" <hu************@hotmail.com> wrote in message
news:70**************************@posting.google.c om...
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 peoples' NT
logons to user-stamp data changes made through the web-pages. So it
seemed obvious to use Windows authentication to access SQL
connections.

On my development box (running ASP.NET 1.1, with Anonymous Login
disabled and Windows authentication), my pages work fine.

I have copied all the files over to a development web server (did I
need to compile them on the web server? - I guessed not). This web
server has the same web site setup, with Anonymous Login disabled, and
Windows authentication.

On both boxes I have set impersonate="true" in the web.config.

The whole lot is using Windows 2000 (server on the test server), with
sp3. The SQL box is also W2k with sp3, and all are on the same
network.
If I start up the web pages from my development box, and access the
pages on the test server, I get access problems when opening SQL
connections:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Stack trace (for those who want to see it):
************************************************** ****************
[SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
BusinessPlans.Reference.GetSelectSQL(String p_ConnStr, String
p_SPName, String p_TableName, String p_ResultParamName) +66
BusinessPlans.Reference.PopulateDataGrids(Boolean p_ApplyMask,
Boolean p_AddNewItem) +521
BusinessPlans.Reference.ShowTable(Object sender, CommandEventArgs e)
+74
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e)
+110
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.Rai
sePostBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +1277
************************************************** ****************

BUT...

in the same session I have the following set up as well:

Authentication name=MyDomain\MyLogin,
Authentication type=NTLM
Authentication passed=True

I don't see what I'm doing wrong here.

BUT...

things get even wierder when I access the pages from the test server
itself. They all work OK, and if I immediately go back and try to
access them from my development box again, they work fine!

!!!!

What is going on? The errors return if I leave the connections for a
number of minutes (presumably because the connections/sessions
time-out), the errors return. Is it failing to set up a pooled
connection on the remote server (and if so, why?) or is it something
even more obscure?

Help!

Any help would be most gratefully received.

Mike.

Nov 17 '05 #3
Actually, the scenario does work. I've been experiencing the exact
same problem. I spent a couple of hours last night reading through
various news group postings which all have different answers, though
none really seem to work consistently. I've gotta tell you that "any
search of this newsgroup" will not tell you that you can't forward NT
credentials. Some do, most don't. With that said, I do understand
forwarding of credentials to be impossible, but what Mike reported in
the original post is exactly what I've experienced so there's got to
be something else in play.

Mike, did you ever find a solution?

"bruce barker" <no***********@safeco.com> wrote in message news:<Oo**************@TK2MSFTNGP11.phx.gbl>...
this scenario will not work, as any search of this newsgroup will tell you.
you can not forward nt creditals. you have three choices

1) switch to a credital format that will forward, by using basic or digest
authentication.
2) put the sql server on the same box as the web server (no forwarding
required)
3) fill in the username and password in the web config, and pass in the user
credials though another method to the sqlserver.

for more details, google this newsgroup.

-- bruce (sqlwork.com)

"Mike Hutton" <hu************@hotmail.com> wrote in message
news:70**************************@posting.google.c om...
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 peoples' NT
logons to user-stamp data changes made through the web-pages. So it
seemed obvious to use Windows authentication to access SQL
connections.

On my development box (running ASP.NET 1.1, with Anonymous Login
disabled and Windows authentication), my pages work fine.

I have copied all the files over to a development web server (did I
need to compile them on the web server? - I guessed not). This web
server has the same web site setup, with Anonymous Login disabled, and
Windows authentication.

On both boxes I have set impersonate="true" in the web.config.

The whole lot is using Windows 2000 (server on the test server), with
sp3. The SQL box is also W2k with sp3, and all are on the same
network.
If I start up the web pages from my development box, and access the
pages on the test server, I get access problems when opening SQL
connections:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Stack trace (for those who want to see it):
************************************************** ****************
[SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction) +474

System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec
tionString
options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
BusinessPlans.Reference.GetSelectSQL(String p_ConnStr, String
p_SPName, String p_TableName, String p_ResultParamName) +66
BusinessPlans.Reference.PopulateDataGrids(Boolean p_ApplyMask,
Boolean p_AddNewItem) +521
BusinessPlans.Reference.ShowTable(Object sender, CommandEventArgs e)
+74
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e)
+110

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.Rai
sePostBackEvent(String
eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +1277
************************************************** ****************

BUT...

in the same session I have the following set up as well:

Authentication name=MyDomain\MyLogin,
Authentication type=NTLM
Authentication passed=True

I don't see what I'm doing wrong here.

BUT...

things get even wierder when I access the pages from the test server
itself. They all work OK, and if I immediately go back and try to
access them from my development box again, they work fine!

!!!!

What is going on? The errors return if I leave the connections for a
number of minutes (presumably because the connections/sessions
time-out), the errors return. Is it failing to set up a pooled
connection on the remote server (and if so, why?) or is it something
even more obscure?

Help!

Any help would be most gratefully received.

Mike.

Nov 17 '05 #4

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

Similar topics

3
by: Stanley J, Mroczek | last post by:
My disk was replaced and i reload all my software. I think that i named my computer best-si-01 instead of BEST-SI-01 and thats my error? Login failed for user 'NT AUTHORITY\NETWORK SERVICE'....
14
by: John J. Hughes II | last post by:
I have "Computer A" which is running Win2K3 and MS SQL server. And "Computer B" which is running a service that I have created. If I change the service on "Computer B" to run as a user my program...
0
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...
1
by: Ibrahim Mohamed El-Ganady | last post by:
Mr : I have proplem with Visual stdio 2003 and Windows2003 Enterprise Server , when I developed web application using ASP.Net (VB) that establish connection to SQL Server database the following...
3
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
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
by: Buggyman | last post by:
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...
2
by: Adnan Al-Ghourabi | last post by:
Hi, We have an application running on IIS 6.0, on a windows 2003 box. The back-end database, a SQL Server 2000, runs on anohter server, windows 2000. We have enabled integrated authentication,...
3
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.