473,413 Members | 1,802 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,413 software developers and data experts.

ASP.NET 1.1 Application Pool Identity and user authentication problem with AD (Active Directory)

Hello all,

Here is the context of my problem:

We have an ASP.NET 1.1 application that has its own application pool
setup and that runs under the identity of a NT Domain service account
(this is for security reason when accessing databases). We use the
Integrated Windows authentication to authenticate users, and we have
setup the Web.config file to authenticate those users against 3 NT
Domain Global Groups. Everything is working fine (the application is
up and running since 1.5 year already) and security is respecting the
application's security requirements.

We are in the process of moving all of our servers (including this IIS
6.0 server) into AD (Active Directory). This week was this server's
turn to be migrated and everything turns out ok from a migration point
of view. What is not working anymore is is the authentication of
users.

Remember I just said that the application pool is running under a NT
Domain service account? Well since we are moving to AD, we also have
to move the user accounts (and service accounts) into AD. So we are
now using an AD service account to run the application pool. So far so
good, but to our dismay, we are unable to authenticate any users
anymore! It looks like IIS's new Application Pool identity isn't able
to validate against AD properly. Me and the migration team have check
a lot of things, but we must be missing something trivial.

If anyone can point me into some direction, I would appreciate.

And here is and excerp from our Web.config file concerning the
authentication and authorization.

<system.web>
....
<authentication mode="Windows" />
<identity impersonate="false"/>
<authorization>
<allow roles="AD\group1, AD\group2, AD\group3" />
<deny users="*" />
</authorization>
....
</system.web>

And yes, the <identity impersonate="false"/> is correct since we are
using the Application's Pool identity.

Thank you for any help!
P.J

Nov 20 '05 #1
4 4639
the application pool controls the account the asp.net worker process runs
under. windows authenication is performed by IIS, not asp.net. IIS just
passes the security token to the worker process. check the vdir settings
still have anonymous turned off. also the server must be trusted by the ad.

check that you can logion with an ad account on the webserver.

-- bruce (sqkwork.com)


<pj*********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Hello all,

Here is the context of my problem:

We have an ASP.NET 1.1 application that has its own application pool
setup and that runs under the identity of a NT Domain service account
(this is for security reason when accessing databases). We use the
Integrated Windows authentication to authenticate users, and we have
setup the Web.config file to authenticate those users against 3 NT
Domain Global Groups. Everything is working fine (the application is
up and running since 1.5 year already) and security is respecting the
application's security requirements.

We are in the process of moving all of our servers (including this IIS
6.0 server) into AD (Active Directory). This week was this server's
turn to be migrated and everything turns out ok from a migration point
of view. What is not working anymore is is the authentication of
users.

Remember I just said that the application pool is running under a NT
Domain service account? Well since we are moving to AD, we also have
to move the user accounts (and service accounts) into AD. So we are
now using an AD service account to run the application pool. So far so
good, but to our dismay, we are unable to authenticate any users
anymore! It looks like IIS's new Application Pool identity isn't able
to validate against AD properly. Me and the migration team have check
a lot of things, but we must be missing something trivial.

If anyone can point me into some direction, I would appreciate.

And here is and excerp from our Web.config file concerning the
authentication and authorization.

<system.web>
...
<authentication mode="Windows" />
<identity impersonate="false"/>
<authorization>
<allow roles="AD\group1, AD\group2, AD\group3" />
<deny users="*" />
</authorization>
...
</system.web>

And yes, the <identity impersonate="false"/> is correct since we are
using the Application's Pool identity.

Thank you for any help!
P.J

Nov 20 '05 #2
After more than two weeks digging in this problem, I have some
interesting things to share in order to help anyone with this kind of
problem.

First, I will point you to a couple of articles that we tackled with
but still with no success.
Next, I will tell you how to replicated the problem if you want to
experiment and try solving it.

This first article describes exactly the problem we have.
Unfortunately, the solution proposed can't be adopted since we have
multiple application pool each running under its own specific domain
account. The workaround proposed is one that we might use in the last
resort because we do not want to rely on NTLM anymore to perform
authentication.
http://support.microsoft.com/kb/871179/en-us

The next article explain why anthentication uses NTLM instead of
Kerberos:
http://technet2.microsoft.com/Window...6e8dd1033.mspx

This one indicates on to configures IIS to support both Kerberos and
NTLM authentication:
http://support.microsoft.com/kb/215383/EN-US/

Another Kerberos article on user belonging to too many groups:
http://support.microsoft.com/?kbid=280830

This last two articles is about delegating authentication and we have
not yet investigate it:
http://www.microsoft.com/technet/pro...a81454cfe.mspx
http://www.microsoft.com/technet/pro...5d2159199.mspx
In order for some of you to replicate the problem we have and to try
their hands on it, follow these lines to create a very simple .NET
application.

1- On a Windows Server 2003, put an ASP.NET 1.1 application (that you
made on your dev station) that does nothing (no lines of code in it)
except maybe printing a message ;

2- In IIS Manager, create a new application pointing to the folder you
just copied you application. Be sure that only Windows integrated
authentication is selected in 'Directory Security'

3- Still in IIS Manager, create a new application pool, and under the
'Identity' tab, click the radio-button 'Configurable' and type in a
service account from your Active Directory and its password; Set your
application to use the new application pool you just created.

4- Add this selected Active Directory account to the local group
IIS_WPG;

5- Add the Read NTFS rights for this Active Directory account on the
folder of your application and the local Users groups too;

6- In the Web.config file of your application, check that these
settings are like those in the <system.web> section:

<authentication mode="Windows" />
<identity impersonate="false" />
<authorization>
<allow users="*" />
</authorization>

7- Try to access your site to your *.aspx page and you should be
prompted to authenticated even though you have the rights to access it.

Well I have no more time to write more at the moment, but I will come
back with news as soon as I have.
Thx!
P.J

Nov 30 '05 #3
Also, the info on David Wang's blog about Kerberos and authentication
error is quite, eh, surprising I must say, since it looks like this was
'common knowledge'.

http://blogs.msdn.com/david.wang/default.aspx
Go on his site and search for 'kerberos' keyword with is search tools,
then do a CTRL+F and look for this string on the resulting page:
401.1 Denied by Invalid User Credentials

Nov 30 '05 #4
The following article from Microsoft finally explain why the problem we
encountered is 'normal':

http://www.microsoft.com/technet/pro...7.mspx?pf=true

Unfortunately for us, we have to rethink some aspect of the application
since we put a lot on using the application pool to heighten the
security and access between services. Too bad our application were
made before moving to AD because we would have change the architecture
some how.

At least, we can make everything work by 'turning on' the NTLM
authentication, but we can't live with this for very long I'm afraid.

I hope that this had help some of you with the same problem, and I do
hope that I help other planned their architure on NOT using specific
identity with their application pool, but to stay with the 'Network
Service' accound since this always work (and for more reason than only
authentication - those of you who have found my previous posting this
year about the worker process recycling not working as expected when
NOT running under Network Service know what I am talking about.

Good Luck people!

Dec 5 '05 #5

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

Similar topics

2
by: Shishir | last post by:
Hi Guys, Scenario:: I am using appplication pool identity to connect my database through ASP.NET application. the identity is domain identity and i am giving as domainname\username and with its...
7
by: Stephen | last post by:
I have my intranet setup on our web server. It contains multiple applications, but none are set up in the default application pools. In other words, I create a webform and plop it into a...
1
by: Mike Moore | last post by:
Does anyone have suggestions on the best way to check if a user is logged into asp.net web application? We are not using forms authentication. We are authenticating our users against active...
1
by: Gerry | last post by:
I have an ASP.NET application installed on a Windows Server 2003 computer. MS Excel is also installed on the same computer. And yes, the application makes use of Excel. When the Application Pool...
5
by: Jon Skeet [C# MVP] | last post by:
I've run against a problem which I'm *sure* must be easy to solve - but I'm blowed if I can find the answer :( I have a web service which I want to require authentication. I need to authenticate...
0
by: mcrose | last post by:
I couldn't find anything that quite described this in whole, so I'm going to post it since from what I can tell about 400 other people have posted asking how to do this and received partial answers...
0
by: jordo | last post by:
I have an asp.Net app that connects to the WSS 2.0 list web service. I'm having issues with IIS and .Net configurations and hope that someone can help me. My ideal configuration is: asp.net:...
3
by: Brian McCullough | last post by:
Hello, I am trying to query ADAM using the ActiveDirectoryMembershipProvider in my ASP.NET 2.0 application, but have been unsuccessful. I have followed the steps in these blog posts, but still...
3
by: Joseph Geretz | last post by:
I created a new Application Pool for my ASP.NET application since I want it to run under a specific user identity with privileges to access the application database. (I don't want to grant access...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
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
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,...

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.