Impersonation

M

Mark

We are using impersonation so that a user on our domain will login into our
SQL Server using their own domain login and/or associated domain groups. To
do this, we've added:

<authentication mode="Windows" />
<identity impersonate="true"/>

to our web.config file. In IIS, annonymous access is unchecked, digest
authentication is unchecked, basic authentication is unchecked, and
Integrated Windows Authentication is checked.

The problem: This works like a charm on my local pc running IIS and
connecting to SQL Server A, but the momemnt I load it up on our development
web site with the same web.config file and same IIS settings, the connection
to SQL Server A bombs with the error message:
"Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection." Note that the rest of the site that does not use a
connection to SQL Server works just fine.

We used SQL Profiler and it claims that the development web site is using an
ANONYMOUS LOGON anyway ... but the two setups are identical as described
above.

Any ideas?? Thanks in advance for your help! We appreciate it.

Mark
(e-mail address removed)
 
G

Guest

ANONYMOUS LOGON is the problem. <identity
impersonate="true"/> means run under the current
authenicated user account. In your case, Users dont get
authenticated for anonymous site. Is this a public
internet site? If so, you might want to create a SQL
server account for this application.
 
M

Mark

As I mentioned below, IIS is set to use Integrated Windows Authentication.
Hence, unless it's in your list of trusted sites, it prompts you for your
domain login, password, and the name of the domain. And, as I mentioned
below, annonymous access in IIS is unchecked.

Am I misunderstanding your question? Any other suggestions?

We'd appreciate any and all help.

Mark
(e-mail address removed)
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top