Fwd: Re: Python code running as Anonymous user?

Skip to first unread message

Mark Hammond

Nov 11, 2010, 8:27:06 PM11/11/10
to isapi_wsgi-dev

-------- Original Message --------
Subject: Re: Python code running as Anonymous user?
Date: Fri, 12 Nov 2010 00:59:03 +0000
From: jame...@googlemail.com
Reply-To: jame...@googlemail.com
To: Mark Hammond <mham...@skippinet.com.au>

Hi Mark,

Your reply was incredibly useful. I thought that the user setup within
the Application Pool would have been the one used, rather than the
impersonated user aka the anonymous user. It is all running perfectly
now. :)

It would be really useful I think, if these problems could be put in an
faq for other people.

Thanks again Mark.


------Original Message------
From: Mark Hammond
To: isapi_w...@googlegroups.com
Cc: James Pacileo
Subject: Re: Python code running as Anonymous user?
Sent: Nov 11, 2010 10:25 PM

On 11/11/2010 4:14 AM, pyPax wrote:
> Hi folks,
> I am running a Django site with isapi_wsgi under both IIS6 and IIS7.5.
> Both are using either django-mssql and/or django-pyodbc. Both
> libraries cannot connect to the database with Windows authenticated,
> as apparently the code is run by an Anonymous user.

You mean you have the DB configured to use Windows authentication and it
doesn't work? If so, IIS allows you to specify what Windows user is
used for anonymous requests, and you will need to configure the DB to
allow this user (and possibly adjust other permissions for the user,
depending on how the DB client connects to the server.

> I have set the Application pool to run under the User with SQL Server
> access, but it doesn't seem to be making a difference.

You might like to see what win32api.GetUserName() returns in the django
code just before it attempts to hit the DB - IIRC, IIS will explicitly
switch to the configured anonymous user's account.



Sent from my BlackBerry� wireless device

Reply all
Reply to author
0 new messages