Change Default Files

You just have to add the attribute 'fileName' with value to the provider's config element.
Here below are examples of how to do that for all providers:
  • XmlRoleProvider
<roleManager enabled="true" defaultProvider="XmlRoleProvider">
    <providers>
	<clear/>
	<add applicationName="YOUR_APP" fileName="Roles.xml" name="XmlRoleProvider" type="Artem.Web.Security.XmlRoleProvider" />
    </providers>
</roleManager>
  • XmlMembershipProvider
<membership defaultProvider="XmlMembershipProvider">
    <providers>
	<clear/>
	<add applicationName="YOUR_APP" fileName="Users.xml" name="XmlMembershipProvider" type="Artem.Web.Security.XmlMembershipProvider"
minRequiredPasswordLength="1" minRequiredNonAlphanumericCharacters="0" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" 
passwordFormat="Hashed"/>
    </providers>
</membership>
  • XmlProfileProvider
<profile enabled="true" defaultProvider="XmlProfileProvider">
    <providers>
	<clear/>
	<add applicationName="YOUR_APP" fileName="Profiles.xml" name="XmlProfileProvider" type="Artem.Web.Security.XmlProfileProvider"/>
    </providers>
</profile>


In the examples here I have just changed the files' extensions form 'config' to 'xml'.
You can change the names to any you want.

However, I have not implemented a way to change the default folder (App_Data) for now, but that could be done/fixed.
If you are interested in that, please add it as working item in issue tracker and will do it.


Happy coding ...

Any smart ideas and comments are welcome. Please do not hesitate to question me
See more about me and my works under ArtemBG | WebUtil.net

Last edited Jan 8, 2008 at 9:36 AM by velio, version 1

Comments

No comments yet.