This project is read-only.

Using two different sql providers

Topics: ASP.NET 2.0, Business Logic Layer
Aug 20, 2007 at 10:01 PM
Hi There,
First of all, I would like to thank you for creating this blog app. Kudos to everybody who has contributed to it. It is really really helpful
Secondly, I am trying to use this app and I have a few questions.
Can anybody please let me know if I can use two sql providers (I mean two databases), one for membership and one for storing the blog's data. The reason for this is, I wanted to use memebership provider and roleprovider for taking care of authentication and authorization and the other for storing blog information (like entries, categories, settings, ping services etc). I was creating the users using the GUI and I noticed that everybody can do everything. I would like to limit some of the functionlity to be exclusive for Admin users. Can I get this out of the box or do I need to extend it? Can somebody please let me know the web.config settings to achieve this if the functionality is already built into the system and it is a matter of configuration?
Thanks a lot!!
Aug 29, 2007 at 4:00 PM
Ok..this is what I did for the above post...
Changed the default provider from XmlMembershipProvider to SqlMembershipProvider which took care of the authentication..

<membership defaultProvider="SqlMembershipProvider" userIsOnlineTimeWindow="20">
<add name="MembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="JDNClient" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" passwordFormat="Hashed" applicationName="/"/>
<add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider" description="XML membership provider" xmlFileName="~/App_Data/users.xml"/>

The other issue of changing the app to use database rather than xml files for storing blog info is already documented in the blog engine documentation.

And for now we don't have any problem allowing everybody see everything and so I don't need to worry about the Administration part.