Home All Groups Group Topic Archive Search About
Author
22 Feb 2007 5:05 PM
nkw
I have an ASP.net app and I have the following connection string:

<add name="ConnectionString" connectionString="Data Source=DBS-004;Initial
Catalog=DB1;Integrated Security=True" providerName="System.Data.SqlClient" />

I use Windows authentication and the Page.User.Identity.Name is my Windows
logon. However, the Asp.Net connect the SQL server as:

Domain\DBS-004$

Where DBS-004 is the machine host name.

I do have Windows logon on the SQL Server. Shouldn't the windows logons be
used?

Author
23 Feb 2007 12:37 AM
Cowboy (Gregory A. Beamer)
Allow anonymous access on the ASP.NET app? If so, there is your trouble. By
default, ASP.NET apps work under anon credentials, which will not work when
you try to contact SQL with integrated security.

You have a couple of choices:

1. Impersonate users - every user needs a SQL account, or belongs to a group
with SQL access
2. Switch to forms auth and use SQL account rather than integrated
3. Fake impersonation (getting more and more difficult in Vista/Longhorn, so
be careful)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

********************************************
Think outside the box!
********************************************
Show quote
"nkw" <n**@discussions.microsoft.com> wrote in message
news:90D27C0C-EE97-4709-8DE2-6C2962962325@microsoft.com...
>I have an ASP.net app and I have the following connection string:
>
> <add name="ConnectionString" connectionString="Data Source=DBS-004;Initial
> Catalog=DB1;Integrated Security=True" providerName="System.Data.SqlClient"
> />
>
> I use Windows authentication and the Page.User.Identity.Name is my Windows
> logon. However, the Asp.Net connect the SQL server as:
>
> Domain\DBS-004$
>
> Where DBS-004 is the machine host name.
>
> I do have Windows logon on the SQL Server. Shouldn't the windows logons be
> used?

AddThis Social Bookmark Button