Problem with Configuration Tool

Jun 2, 2009 at 7:35 PM

Hello guys. I'm developing an ASP.NET CMS which must not use SQL Server or mdf as datastore. That's why I was so happy to find these XmlProviders, but I'm having problem with them.

When I run ASP.NET Configuration Tool and browse to Security tab, it gives me this error:

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Unable to load persitable object from file C:\xxxxxxxxxxxxxxxxxx\App_Data\Users.xml.

My web.config looks like this:

<membership defaultProvider="XmlMembershipProvider">

      <providers>

        <clear/>

        <add applicationName="/" name="XmlMembershipProvider" type="Artem.Web.Security.XmlMembershipProvider"

      minRequiredPasswordLength="1" minRequiredNonAlphanumericCharacters="0" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"

      passwordFormat="Hashed"/>

      </providers>

    </membership>

    <roleManager enabled="true" defaultProvider="XmlRoleProvider">

      <providers>

        <clear/>

        <add applicationName="/" name="XmlRoleProvider" type="Artem.Web.Security.XmlRoleProvider"/>

      </providers>

    </roleManager>

Any help appreciated. Thx.

Coordinator
Jun 4, 2009 at 6:12 PM
Edited Jun 4, 2009 at 6:14 PM

Hi,

Looks like missing or corrupted users file: /App_Data/Users.xml
You can try replacing the Users.xml file with the one provided here as a sample.

I manage to reproduce same error when I have cleared all the content in my Users.xml file, even the root element: ArrayOfXmlUser.
The only content in my Users.xml file was:
<?xml version="1.0"?>


Other issue could be, if you have some users persisted already in the Users.xml and then you changed some of the settings - like passwordFormat for example.
So, if you change settings, I would suggest you clearing all the data in Users.xml and leave just the root element: ArrayOfXmlUser.

Regards,
Velio

Jun 5, 2009 at 5:47 PM

Yes, that was the problem. My Users.xml had only XML declaration in it. I just had to add the root node (ArrayOfXmlUsers or whatever it was called) and it worked like magic.... Thank you for this amazing providers!