Thursday, March 17, 2011

ASPNET State Database

You will need to run the following commands using a db login that has Create Database permission.
(command prompt)

cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

aspnet_regsql -S serverName -U myUser -P p4zz#w0rd -ssadd -sstype c -d MyASPState


-S server name
-U user (database server login)
-P user's password
-d database name

1 comment:

fc said...

For trusted connections (i.e.: you are logged in to the machine and want to create the database without having to specify a login and pasword) use:

c:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql -S localhost -E -ssadd -sstype c -d MeinAspState