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

Impersonate and IIS6 driving me nuts

Hi NG,

I have written some Apps in ASP.NET that access a SQL Server on another
machine. I never had a problem doing this in IIS5(.1).
Most Apps are Intranet Application where I use the integrated windows
authentication. So my webconfig uses <identity impersonate="true"/>. My
Problem is that I now had to install one app on a Windows 2003 Server. I
tried to run my app but I allways get the error that anonymous access is not
allowed.

So here is what I did right now:
- I tried to create a new AppPool. I assigned the app to the new AppPool. I
changed the Identity to 'local system'. I allowed delegation for this
machine (the iis machine). Same Error.
- I configured the AppPool to use my account and added my account to the
local group (IIS_WPG). After that I was prompted to enter my credentials if
I access the website. But my creds are not accepted.

I have to use integrated windows authentication (and it's the only
authentication that is enabled).
If I use simple authentication (I did to test it) all works fine.
btw: Impersonation works. I checked
System.Web.HttpContext.Current.User.Identity.Name and it is the user that
accesses the website.

thx in advance
Bjoern
Nov 18 '05 #1
6 1745
your scenario will not work with ii5 or iis6.0. a search of this newsgroup
will give you lots of answers.

the short answer is windows authentication does not support delegation
(passing credentials from one server to another) and is limited to the one
hop rule, only a primary token can be passed to a second server. windows
authentication on iis (all versions) gives the thread a secondary
(impersonation) token which can not be used to access any network resouce.

your only option is basic (which gives iis a primary token), or digest which
supports delegation. digest requires AD and delegation to be enabled
(default is off).
-- bruce (sqlwork.com)


"Bjoern Wolfgardt" <gi***************@removeme-cigate.de> wrote in message
news:#r**************@TK2MSFTNGP09.phx.gbl...
Hi NG,

I have written some Apps in ASP.NET that access a SQL Server on another
machine. I never had a problem doing this in IIS5(.1).
Most Apps are Intranet Application where I use the integrated windows
authentication. So my webconfig uses <identity impersonate="true"/>. My
Problem is that I now had to install one app on a Windows 2003 Server. I
tried to run my app but I allways get the error that anonymous access is not allowed.

So here is what I did right now:
- I tried to create a new AppPool. I assigned the app to the new AppPool. I changed the Identity to 'local system'. I allowed delegation for this
machine (the iis machine). Same Error.
- I configured the AppPool to use my account and added my account to the
local group (IIS_WPG). After that I was prompted to enter my credentials if I access the website. But my creds are not accepted.

I have to use integrated windows authentication (and it's the only
authentication that is enabled).
If I use simple authentication (I did to test it) all works fine.
btw: Impersonation works. I checked
System.Web.HttpContext.Current.User.Identity.Name and it is the user that
accesses the website.

thx in advance
Bjoern

Nov 18 '05 #2
Do you need authentication for the whole website or just one of two specific
operations?
--
Shiv R. Kumar
http://www.matlus.com
Nov 18 '05 #3
Thx,

I thought this is one of the key features of Kerberos (which integrated
authentication will use). And a look at AD Users and Computers on the
delegation tab will show that it requires Kerberos.

Do you have any good articles about this ???

cu
Bjoern
"bruce barker" <no***********@safeco.com> schrieb im Newsbeitrag
news:O%****************@TK2MSFTNGP09.phx.gbl...
your scenario will not work with ii5 or iis6.0. a search of this newsgroup
will give you lots of answers.

the short answer is windows authentication does not support delegation
(passing credentials from one server to another) and is limited to the one
hop rule, only a primary token can be passed to a second server. windows
authentication on iis (all versions) gives the thread a secondary
(impersonation) token which can not be used to access any network resouce.

your only option is basic (which gives iis a primary token), or digest which supports delegation. digest requires AD and delegation to be enabled
(default is off).
-- bruce (sqlwork.com)


"Bjoern Wolfgardt" <gi***************@removeme-cigate.de> wrote in message
news:#r**************@TK2MSFTNGP09.phx.gbl...
Hi NG,

I have written some Apps in ASP.NET that access a SQL Server on another
machine. I never had a problem doing this in IIS5(.1).
Most Apps are Intranet Application where I use the integrated windows
authentication. So my webconfig uses <identity impersonate="true"/>. My
Problem is that I now had to install one app on a Windows 2003 Server. I
tried to run my app but I allways get the error that anonymous access is not
allowed.

So here is what I did right now:
- I tried to create a new AppPool. I assigned the app to the new AppPool. I
changed the Identity to 'local system'. I allowed delegation for this
machine (the iis machine). Same Error.
- I configured the AppPool to use my account and added my account to the
local group (IIS_WPG). After that I was prompted to enter my credentials

if
I access the website. But my creds are not accepted.

I have to use integrated windows authentication (and it's the only
authentication that is enabled).
If I use simple authentication (I did to test it) all works fine.
btw: Impersonation works. I checked
System.Web.HttpContext.Current.User.Identity.Name and it is the user

that accesses the website.

thx in advance
Bjoern


Nov 18 '05 #4
Thx,

I need it for the whole website (for the SQL Connection).

cu
Bjoern

"Shiv Kumar" <sh***@erolsnoooospaaaam.com> schrieb im Newsbeitrag
news:ed**************@TK2MSFTNGP11.phx.gbl...
Do you need authentication for the whole website or just one of two specific operations?
--
Shiv R. Kumar
http://www.matlus.com

Nov 18 '05 #5
Sorry it's me again.

I found this (taken from IIS6 resource kit - Managing a Secure IIS 6.0
Solution):
Constrained delegation is particularly useful in scenarios in which a site
that requires authentication - a site that does not allow anonymous access -
contains content that is housed on a remote UNC file server. With
constrained delegation, you can enable Integrated Windows authentication,
which can use NTLM authentication or send credentials across the network as
a Kerberos token. For more information about Integrated Windows
authentication, see "Integrated Windows Authentication" earlier in this
chapter.
If you do not use constrained delegation but you enable Integrated Windows
authentication, the token that the Web server obtains from the security
infrastructure of Windows does not have sufficient permissions to access
another computer, such as your file server. However, with constrained
delegation and Integrated Windows authentication, the token received by the
Web server from the security infrastructure of Windows is a Kerberos-based
token with permission to access other computers, including the file server.
Essentially, constrained delegation allows an NTLM-based token to be
upgraded to a Kerberos-based token.

Do I missunderstand this? This is what I want todo...

cu
Bjoern

"Bjoern Wolfgardt" <gi***************@removeme-cigate.de> schrieb im
Newsbeitrag news:u1**************@TK2MSFTNGP10.phx.gbl...
Thx,

I thought this is one of the key features of Kerberos (which integrated
authentication will use). And a look at AD Users and Computers on the
delegation tab will show that it requires Kerberos.

Do you have any good articles about this ???

cu
Bjoern
"bruce barker" <no***********@safeco.com> schrieb im Newsbeitrag
news:O%****************@TK2MSFTNGP09.phx.gbl...
your scenario will not work with ii5 or iis6.0. a search of this newsgroup
will give you lots of answers.

the short answer is windows authentication does not support delegation
(passing credentials from one server to another) and is limited to the one hop rule, only a primary token can be passed to a second server. windows
authentication on iis (all versions) gives the thread a secondary
(impersonation) token which can not be used to access any network resouce.
your only option is basic (which gives iis a primary token), or digest

which
supports delegation. digest requires AD and delegation to be enabled
(default is off).
-- bruce (sqlwork.com)


"Bjoern Wolfgardt" <gi***************@removeme-cigate.de> wrote in message news:#r**************@TK2MSFTNGP09.phx.gbl...
Hi NG,

I have written some Apps in ASP.NET that access a SQL Server on another machine. I never had a problem doing this in IIS5(.1).
Most Apps are Intranet Application where I use the integrated windows
authentication. So my webconfig uses <identity impersonate="true"/>. My Problem is that I now had to install one app on a Windows 2003 Server. I tried to run my app but I allways get the error that anonymous access is
not
allowed.

So here is what I did right now:
- I tried to create a new AppPool. I assigned the app to the new AppPool.
I
changed the Identity to 'local system'. I allowed delegation for this
machine (the iis machine). Same Error.
- I configured the AppPool to use my account and added my account to

the local group (IIS_WPG). After that I was prompted to enter my

credentials if
I access the website. But my creds are not accepted.

I have to use integrated windows authentication (and it's the only
authentication that is enabled).
If I use simple authentication (I did to test it) all works fine.
btw: Impersonation works. I checked
System.Web.HttpContext.Current.User.Identity.Name and it is the user

that accesses the website.

thx in advance
Bjoern



Nov 18 '05 #6
Digest is the micorosft name for Kerberos, and only works with AD users.
also delegation is turned off by default.

-- bruce (sqlwork.com)

"Bjoern Wolfgardt" <gi***************@removeme-cigate.de> wrote in message
news:u1**************@TK2MSFTNGP10.phx.gbl...
Thx,

I thought this is one of the key features of Kerberos (which integrated
authentication will use). And a look at AD Users and Computers on the
delegation tab will show that it requires Kerberos.

Do you have any good articles about this ???

cu
Bjoern
"bruce barker" <no***********@safeco.com> schrieb im Newsbeitrag
news:O%****************@TK2MSFTNGP09.phx.gbl...
your scenario will not work with ii5 or iis6.0. a search of this newsgroup
will give you lots of answers.

the short answer is windows authentication does not support delegation
(passing credentials from one server to another) and is limited to the one hop rule, only a primary token can be passed to a second server. windows
authentication on iis (all versions) gives the thread a secondary
(impersonation) token which can not be used to access any network resouce.
your only option is basic (which gives iis a primary token), or digest

which
supports delegation. digest requires AD and delegation to be enabled
(default is off).
-- bruce (sqlwork.com)


"Bjoern Wolfgardt" <gi***************@removeme-cigate.de> wrote in message news:#r**************@TK2MSFTNGP09.phx.gbl...
Hi NG,

I have written some Apps in ASP.NET that access a SQL Server on another machine. I never had a problem doing this in IIS5(.1).
Most Apps are Intranet Application where I use the integrated windows
authentication. So my webconfig uses <identity impersonate="true"/>. My Problem is that I now had to install one app on a Windows 2003 Server. I tried to run my app but I allways get the error that anonymous access is
not
allowed.

So here is what I did right now:
- I tried to create a new AppPool. I assigned the app to the new AppPool.
I
changed the Identity to 'local system'. I allowed delegation for this
machine (the iis machine). Same Error.
- I configured the AppPool to use my account and added my account to

the local group (IIS_WPG). After that I was prompted to enter my

credentials if
I access the website. But my creds are not accepted.

I have to use integrated windows authentication (and it's the only
authentication that is enabled).
If I use simple authentication (I did to test it) all works fine.
btw: Impersonation works. I checked
System.Web.HttpContext.Current.User.Identity.Name and it is the user

that accesses the website.

thx in advance
Bjoern



Nov 18 '05 #7

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

Similar topics

6
by: Keiron Waites | last post by:
Please see the problem in action here: http://www.leadbullet.biz/contact.php If you mouse over the fields, you will see that text is shown on the right. The text makes the other fields move when...
4
by: Mark J. McGinty | last post by:
Greets, Part of the content of one of our web pages uses wingdings and Chr(239) through Chr(242) (which are little arrow outlines, though that's not really important.) It worked just fine in...
12
by: Marty | last post by:
It seems all of the sudden that user controls that contain images are referencing image sources relative to the document that I drop the control on. This obviously does not work beacuase the...
0
by: Simon Harris | last post by:
Ok, this really is driving me nuts!!! :( 'All' I am trying to do is get the value of a named element. My XML doc is: <?xml version="1.0" encoding="utf-16" standalone="yes" ?> - <Page>...
4
by: trond | last post by:
Hello all, Before I start I'd like to point out that I am a complete novice when it comes to asp.net - My background is in network and operating systems, and although I have been doing a bit of...
2
by: mitsura | last post by:
Hi, I need to read a simle XML file. For this I use the SAX parser. So far so good. The XML file consist out of number of "Service" object with each object a set of attributes. I read...
0
by: Brian | last post by:
Greetings group! I've got a weird one. I have an ASP.NET 1.1 application that has been running on a dual-processor Windows 2000/IIS 5 server for a couple of years. Global.asax has an...
4
by: mattlightbourn | last post by:
Hi all, I have a problem which has been driving me nuts. Crosstab queries! I have a database witch a few different tables to do with garment manufacturing. I have a table for a client...
3
by: DuncanIdaho | last post by:
Hello experts IE 7.0.5730.11 Opera 9.27 Firefox 2.0.0.14 This problem only occurs in Opera and Firefox (amazing, IE does something right, or maybe not) Anyway, the problem is that when I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.