开发者

aspnet_regsql questions and users and role

开发者 https://www.devze.com 2022-12-26 14:35 出处:网络
I spend quite some hours banging my head against the wall trying to set up the aspnet membership / roles tables in my SQL server database instead of having them exist inside the App_Code/ASPNETDB.MDF

I spend quite some hours banging my head against the wall trying to set up the aspnet membership / roles tables in my SQL server database instead of having them exist inside the App_Code/ASPNETDB.MDF file because that file wasn't working correctly o开发者_JAVA技巧n my host. I eventually figured out the problem by following Scott's gu here and was able to resolve it by running the aspnet_regsql.exe utility and creating a connection string for LocalSqlServer.

The ridiculous part about it is that after running the aspnet_regsql and upload my database to my webhost all of my users and role that I have already created is gone. The user, membership, role, etc is gone. I can't populate this using the Web Site Administration Tool as it's not visual studio now. So what is the easiest way to populate the user, role, etc to my SQL Server as I now have dbo.aspnet_Application, dbo.aspnet_Paths, dbo.aspnet_Roles, etc...etc...


If you have sql 2008 managment studio in your local computer, you can use the generate script to create a script with the necessary inserts. Just make use u set the script data option to true.

If sql 2008 managment studio you can use this script. http://vyaskn.tripod.com/code/generate_inserts.txt

0

精彩评论

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