Hi,

I'm facing an while issue accessing SQL Server using Windows Authentication.
There is one webpart (Sharepoint) which gets connected to a database and
displays some data. There is one service account allocated - with Windows
Authentication enabled. Now when the user loads the webpage, wepart tries to
access using the connection string with Windows authentication. Webpart is
trying to access the SQL Server DB with the logged in user's windows account
- which does not have access to the DB. Is it possible to access the Database
for the logged in user using another Windows Authenticated service account.
Is it possible to execute one block of code with another service acccount
(another windows credentials).

Thanks in Adavance
Suhas

Re: Problem accessing SQL Server using Windows Authentication by Frans

Frans
Wed Aug 03 02:43:40 CDT 2005

Suhas Vengilat wrote:

> Hi,
>
> I'm facing an while issue accessing SQL Server using Windows
> Authentication. There is one webpart (Sharepoint) which gets
> connected to a database and displays some data. There is one service
> account allocated - with Windows Authentication enabled. Now when the
> user loads the webpage, wepart tries to access using the connection
> string with Windows authentication. Webpart is trying to access the
> SQL Server DB with the logged in user's windows account - which does
> not have access to the DB. Is it possible to access the Database for
> the logged in user using another Windows Authenticated service
> account. Is it possible to execute one block of code with another
> service acccount (another windows credentials).

This is configurable in IIS. In your website's properties, you can
click on 'document security', in there click on edit next to
authentication and access control. Make sure 'integrated security' is
not selected/checked.

After you've configured your website correctly, the user defined for
the website, typically ASPNET, will be used to connect to the db. If
you want to use another user, use impersonation, OR use sqlserver
specific users.

Frans

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------