SQL Server logon name

G

Guest

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?
 
C

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!
********************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top