Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Impersonation headaches

Reply
Thread Tools

Impersonation headaches

 
 
Stephajn Craig
Guest
Posts: n/a
 
      12-16-2003
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


 
Reply With Quote
 
 
 
 
George Ter-Saakov
Guest
Posts: n/a
 
      12-16-2003
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      12-17-2003
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" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
repost: headaches with formatting in VWD D. Shane Fowlkes ASP .Net 2 03-17-2006 01:43 PM
Publish Web Site Headaches Alex Greenberg ASP .Net 9 01-31-2006 12:37 PM
Impersonation headaches with ASP.NET 2.0 -- help! cider123@hotmail.com ASP .Net Security 2 12-07-2005 04:33 PM
[ENTER] key causing major headaches. Eric ASP .Net 5 06-25-2004 11:19 PM
Oh those Transaction Headaches! Dano ASP .Net 2 11-17-2003 08:49 PM



Advertisments