sql server membership provider

Feb 14, 2009 at 8:27 PM
Edited Feb 15, 2009 at 11:27 AM
I seem to have a few issues getting BE set up to use the mssql server 2008.

1> I already have an existing website that uses membership provider, all the set up files guides I see involve setting up a new membership provider, but i want to set BE up with my existing one.
2> To do the above, do I have to integrate both web.config files? or is there a way to go about this so I dont have to?
3> Ideally I would like to be able to set up a  multi blog, so each user can have a separate blog, are there any guides for this (excluding sueetie).
4> Also i cant seem to set up a new user in the sql server db, error 15007, dont have permissions, i cant see to resolve this either (not exactly a BE issue, but someone may have experienced the same problem)

any  help /suggestions appreciated.

Feb 14, 2009 at 11:34 PM
Edited Feb 14, 2009 at 11:38 PM
You can use your existing membership/role DB tables for BE.  When putting the membership and role settings in your web.config file, you can specify an "applicationName".  I believe all the membership/role DB tables have an applicationName column to distinguish the data among all the applications that may be using the same tables.

The example membership/role settings in this documentation are in fact using applicationName for membership/roles.  It's set to "BlogEngine.NET".  ScottGu shares information on the applicationName property in this blog article.

You'll most likely want to make sure your other application(s) that are already using the membership/role DB tables also specify an applicationName in the web.config files of those application(s).

Multiple blogs in one BlogEngine.NET instance is the top requested feature.  Without making a lot of modifications yourself, your best option is to set up multiple websites or web applications within your web server where each application/site hosts a separate BlogEngine installation.

If you want to store membership/roles and data in a SQL DB (rather than XML files), you can definitely do this by using the that same applicationName property in each blog instance web.config file (you would use a different applicationName value in each web.config file).  This applicationName property would allow you to be able to use the same membership/role DB tables for all your blogs.

For BE data, you can use the "tablePrefix" attribute when adding the DbBlogProvider to the web.config file.  tablePrefix is explained here.  Basically, you would have multiple sets of BE tables -- one set for each blog instance (not the most ideal setup, I know).  So if you have blogs for Bob and John, you could name your tables be_Bob_Posts, be_John_Posts, etc., then the tablePrefix in Bob's web.config file would be "be_Bob_" and it would be "be_John_" in John's web.config file.

Or you can make it easy on yourself, and just use the default XML providers for everything :-)

Off the top of my head, not sure about the DB error ...