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

Home Posts Topics Members FAQ

Impersonation headaches

I'm developing an ASP.NET app on a Windows 2003 Server. My ASP.NET app is
using Windows Authentication and in IIS I have disabled Anonymous Access,
and enabled digest authentication. In my Web.Config file I have put this
line:

<identity impersonate="true" />

My ASP.NET app calls on a SQL Server database that is on a different
machine. I can tell that the ASP.NET engine is picking up my domain
username as being the authenticated user by using this line:

Dim username As String =
System.Security.Principal.WindowsIdentity.GetCurre nt().Name

However, when the call to the database is made, I get this error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

What am I missing here? why is the call to the database going through as
that and not my domain account? My connection string to the database looks
like this:

data source=SOMESERVER;Initial Catalog=SOMEDATABASE;Integrated
Security=SSPI;

Any help would REALLY be appreciated.

--
Stephajn Craig
Nov 18 '05 #1
2 1152
There are several levels of Impersonation
You can look up article in MSDN with the title "Client Impersonation and
Delegation "

What you looking for is delegation level.

I am not sure how ASO.NET works but it might give you a clue.

George.

"Stephajn Craig" <s.*****@NOSPAMfunsunvacations.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I'm developing an ASP.NET app on a Windows 2003 Server. My ASP.NET app is
using Windows Authentication and in IIS I have disabled Anonymous Access,
and enabled digest authentication. In my Web.Config file I have put this
line:

<identity impersonate="true" />

My ASP.NET app calls on a SQL Server database that is on a different
machine. I can tell that the ASP.NET engine is picking up my domain
username as being the authenticated user by using this line:

Dim username As String =
System.Security.Principal.WindowsIdentity.GetCurre nt().Name

However, when the call to the database is made, I get this error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

What am I missing here? why is the call to the database going through as
that and not my domain account? My connection string to the database looks like this:

data source=SOMESERVER;Initial Catalog=SOMEDATABASE;Integrated
Security=SSPI;

Any help would REALLY be appreciated.

--
Stephajn Craig

Nov 18 '05 #2
this setup will not work, as you can not forward nt creditals from the
webserver to the sqlserver (unless the browser is running on the webserver -
like on your dev box). this only works with basic and digest authentication.

there are plenty of posts on the details (google this newsgroup).

-- bruce (sqlwork.com)

"Stephajn Craig" <s.*****@NOSPAMfunsunvacations.com> wrote in message
news:#N**************@TK2MSFTNGP09.phx.gbl...
I'm developing an ASP.NET app on a Windows 2003 Server. My ASP.NET app is
using Windows Authentication and in IIS I have disabled Anonymous Access,
and enabled digest authentication. In my Web.Config file I have put this
line:

<identity impersonate="true" />

My ASP.NET app calls on a SQL Server database that is on a different
machine. I can tell that the ASP.NET engine is picking up my domain
username as being the authenticated user by using this line:

Dim username As String =
System.Security.Principal.WindowsIdentity.GetCurre nt().Name

However, when the call to the database is made, I get this error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

What am I missing here? why is the call to the database going through as
that and not my domain account? My connection string to the database looks like this:

data source=SOMESERVER;Initial Catalog=SOMEDATABASE;Integrated
Security=SSPI;

Any help would REALLY be appreciated.

--
Stephajn Craig

Nov 18 '05 #3

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

Similar topics

3
5146
by: Chris | last post by:
Hello all, Here is my problem. I have a windows service (C#) that is supposed to move files from/to the local drive to/from a UNC share (\\domainserver\share). The service is running on a Win3k...
1
9994
by: Ripa Horatiu | last post by:
Does anyone knows how can I impersonate to another user (basically Administrator) for a piece of my code? I've tried the samples provided by MS but they didn't worked. -- Horatiu Ripa
12
2543
by: Anil Krishnamurthy | last post by:
We have an ASP.NET application that uses COM objects through Interop. The web application requires access to network and database resources and hence, needs to impersonate a domain account. The...
1
3945
by: techfuzz | last post by:
I'm posting my problem experience and solution I found here for other ASP.NET developers. I have a web application that uses Forms Authentication with Active Directory to control access. In...
11
2822
by: Phil | last post by:
Hi, I've currently setup a local user as described in: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnne...
1
1870
by: Patrick | last post by:
I have an ASP.NET web service whose Web.Config is set to use impersonation <authentication mode="Windows" /> <identity impersonate="true" /> Within a Web Method, I want to use...
0
1246
by: velvet.graham | last post by:
I'm having a difficult time with impersonation. I've created an impersonation class. Here is the code below: ******Impersonation Class Code********* Imports System Imports System.Web.Security...
1
1525
by: zhuang | last post by:
Dear all, I found a very interesting thing about viewing crystal report (located on network drive) with asp.net application. To do the impersonation, modify web.config does not work, you have...
5
2653
by: =?Utf-8?B?S2l0dHlIYXdr?= | last post by:
I am in the process of migrating an II6 environment from a single server to a network load balanced system. Thus, I am using a virtual directory on a UNC share to house the dynamic data that the...
0
7384
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
7537
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...
1
7099
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
7525
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
5685
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
5086
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
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.