开发者

Possible to set up application services without using asp_regsql?

Is it possible to set up ASP.NET 开发者_运维百科application services (membership, profiles, roles etc) for a site without having to run the aspnet_regsql tool directly?

I have managed to create the admin user and roles in session start for the first user that visits the site (the developer), but want to go an extra step before hand and create the tables if they don't exist.

The ultimate idea would be just for the DBA to create a blank database on the server and have the web application itself create all the required tables (if they don't exist).


Why not create the tables/procs on your local database, then generate a script for those tables/procs and give that to your DBA?

No automatic process other than the process that generates the local SQL file (App_Data/ASPNETDB.mdf).


You can use the script-files located in your .NET Framework installation directory (for example C:\Windows\Microsoft.NET\Framework\v4.0.30319). There are eight Install*.sql files there. Before you run them however, you have to edit them to change the database name.

A more detailed explanation can be found here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜