Re: Impersonating other domain user in ASP.Net



in your connection string, you specify the server, user id and password

<cmw@xxxxxxxxxx> wrote in message
news:1171478927.000078.122140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am trying to debug an ASP.Net application that uses impersonation to
access a secured SQL Server database (Microsoft cRM as it happens) so
my web.config has

<authentication mode="Windows" />
<identity impersonate="true"/>
<authorization>
<deny users="?" />
</authorization>

Now I'm not too clued up on authentication, active directory etc so
I'm confused as to how my asp.net app appears to SQL Server as a
totally different domain and user.

Here's the code I've used to demonstrate what's happening.

SqlConnection conn = new
SqlConnection("Trusted_Connection=No;Server=sndbx2003dev;Database=03dev_MSCRM;Integrated
Security=SSPI;");
SqlCommand comm = new SqlCommand("SELECT SUSER_SNAME()", conn);
conn.Open();

Literal1.Text = comm.ExecuteScalar().ToString();
conn.Close();

Literal2.Text = HttpContext.Current.User.Identity.Name;

Now Literal1 has 03dev\crmadmin whereas Literal2 has my own company
\myname login.

I've trying to reproduce the same behaviour on a client's machine and
don't know what's going on. I've asked the network guys but they don't
seem to know either but somethings were set up before them.

I've found references to Kerberos but it's a bit over my head at the
moment.

How is this possible?



.



Relevant Pages

  • Re: Impersonating other domain user in ASP.Net
    ... access a secured SQL Server database (Microsoft cRM as it happens) so ... Now Literal1 has 03dev\crmadmin whereas Literal2 has my own company ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Impersonating other domain user in ASP.Net
    ... access a secured SQL Server database (Microsoft cRM as it happens) so ... Now Literal1 has 03dev\crmadmin whereas Literal2 has my own company ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Exactly How to Use Disconnected Recordsets in VB / SQL Server Application
    ... Front-end is VB 6.0, back-end is SQL Server 2000 (actually, MSDE since ... underlying SQL Server database w/the assumption that the user *might* ... the local disconnected recordset on the user's machine would seem to ... time to update each and every record as each user scrolls through the ...
    (microsoft.public.vb.database)
  • Re: DataSet.GetChanges() in RowChanged(DataRowAction.Add)
    ... if the way synchronization needs to be handled changes in the ... > data stored in an SQL Server database. ... > GetChanges() call, but I feel that this workaround is not my best choice. ...
    (microsoft.public.dotnet.framework.adonet)
  • VBA Microsoft Access and SQL Server
    ... I am currently working on a project with Power Point. ... into a Microsoft SQL Server database. ... information from the Microsoft SQL Server database and re-populate a Power ...
    (microsoft.public.office.developer.vba)