Re: attaching SQL Server 2005 Express database in ASP.NET web application
- From: "Bruce Barker" <brubar_nospamplease_@xxxxxxxxxx>
- Date: Mon, 17 Oct 2005 13:26:42 -0700
attach databases requires admin permission. this is due to security, if any
user could attach/detach, they access any database on the hard drive.
your best bet if to suppy an admin page, that does the attach, then grats
access to the asp.net process.
-- bruce (sqlwork.com)
"Loane Sharp" <look_sharp_not@xxxxxxxxxxx> wrote in message
news:ugvHUr00FHA.904@xxxxxxxxxxxxxxxxxxxxxxx
> Hi there
>
> Please help! I'm at my wits' end...
>
> I am using the System.Data.SQLClient namespace in an ASP.NET web
> application
> to connect to a local instance of SQL Server 2005 Express.
>
> Using "AttachDBFileName" in the connection string to attach to the
> database,
> I can connect to the database if the ASPNET account is explicitly (a)
> granted database access and (b) given "SELECT" permission, presumably
> because the ASPNET account has limited permission by default.
>
> I'm certain that I'm dealing with a permission issue: If I assign the
> ASPNET
> account to the Administrators group, I can attach to and access the
> database, but this is too scary for me (not to mention for my principals).
> I've been told that I can let the ASPNET account impersonate the local
> user,
> but the local user will not have been given explicit permission to access
> the database (I'm using XCopy deployment with no knowledge of the ultimate
> user's Windows domain\user details). Alternatively I've been told that I
> can
> get the ASPNET process to run under the System account, but (i) this is
> fairly risky too, (ii) I don't know how to do it, and (iii) I'm uncertain
> whether it would work.
>
> Am I missing something glaring?!!
>
> Please help!
>
> Best regards
> Loane
>
>
>
.
- Follow-Ups:
- Prev by Date: Re: Check if .NET Framework installed on web browser.
- Next by Date: Re: Stumped by VS2005
- Previous by thread: Re: Findcontrol problem
- Next by thread: Re: attaching SQL Server 2005 Express database in ASP.NET web application
- Index(es):
Relevant Pages
|
|