L
Loane Sharp
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
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