Sebastian Leupold wrote
if you want to open Database using SSMS, while DNN web site running, you should attach it in SSMS as usual database and access it useing database name and user instead of impersonation.
I did not understand about impersonation as well as about all those blog's security steps of adding aspnet as login and database user.
By all installations there excessive multiply guaranteed sufficient permissions:
ASPNET is member of builtin\USERS group
And the latter is, by all installs, login to MS SQL Express instance
MSSQL runs as "NT Authority\Network Service"
VS runs (and launch DNN website) as current windows user (for me it is compname\Administrator)
Default Login to MSSQL Expresss instance:
<LocalServerDomainName>\SQLServer2005MSSQLUser$<myCompName>$SQLEXPRESS has member
"NT Autority\Network Service"
Default Login to MSSQL Expresss instance:
<LocalServerDomainName>\Administrator login is mapped to omnipresent and omnipotent database user dbo
through the engagement of AttachDBFileName
-------------------------------
IMHO that blog is time-overkiller and misleader.
At least for a developer who is usually Administraor of his own computer.
As I understood, in order to access App_Data\Database.mdf
simultaneously both from ServerExplorer of VS and from SSMS it is enough:
1)
not opening Database.mdf by double-clicking on it
in Solution Explorer of VS
but passing AddConnection... steps in ServerExplore of VS
2)
In place of a dozen actions mentioned in blog
(btw volatile ones since one would reuire to repeat attaching db in case of db name change
or website relocation-creation,
adding again user and configuring permissions for different website or db instance,
etc., etc.)
it is enough to change in web.config ConnectionString from
User Instance=True
to
User Instance=False
and db will be auto-attached and appear in SSMS upon the first DNN website launch
(do not forget to refresh SSMS!)
If DNN website was already stopped working it is enough to delete (detach) "incorrectly"
added (or attached) dbconnections from Server Explore and/or SSMS
(depends on where and how it was screwed), correspondingly closing(and reopening) VS and SSMS
and pass to 1) and 2).
Essentially it is rather important to know 1),
i.e. to avoid opening mdf by double-clicking mdf if you are going to access it from SSMS.
That's all. Neither impersonations nor security configurations is required
Correct me where I am wrong.