Telerik UserManager not instanciating in upgrade from 3.6 to

Posted by Community Admin on 05-Aug-2018 03:03

Telerik UserManager not instanciating in upgrade from 3.6 to 5.2

All Replies

Posted by Community Admin on 25-Jan-2013 00:00

Hi

I've just upgraded a site from 3.6 to 5.2 and have an issue that I haven't been able to solve.

The site has a custom control used to reset passwords. Within the reset procedure there are the following lines of code:UserManager manager = new UserManager();
manager.DeleteUser(iMemberNumber.ToString());

 

and the code fails on the first line when trying to create an instance of the UserManager (error is object not set to instance of an object).

Is someone able to tell me what I"m doing wrong? I am assuming I might have an issue with membership providers and need to update the security config file - maybe??

Posted by Community Admin on 25-Jan-2013 00:00

Hi Richard,

The code you should use is:

UserManager userManager = UserManager.GetManager();

Kind regards,
Craig Iredale
the Telerik team

Posted by Community Admin on 27-Jan-2013 00:00

Hi Craig

 

Thanks for your response.

 

I don’t have the GetManager method available (I’m using Telerik.Security version 3.7.2136.2, not the original 3.6.1936.2 that I originally started with on the 3.6 site) Is there a different version I should be using?

 

Other than the default constructor, I have Default which looks like it returns an instance of UserManager but it gives me the same error.

 

Could this be to do with my config files? There are some differences between the original 3.6 site config file and the 5.2 config files, but I’m a little unsure which V5.2 file or what content I should be changing.

 

I’ve attached both my SecurityConfig and MigrationConfig files.

 

My new V5.2 web.config contains the following

<roleManager enabled="false"/>

<membership defaultProvider="Default">

       <providers>

              <clear/>

<add name="Default" type="Telerik.Sitefinity.Security.Data.SitefinityMembershipProvider, Telerik.Sitefinity"/>

       </providers>

</membership>

 

The original 3.6 website had the following in its web.config file

<roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="Sitefinity">

      <providers>

        <clear />

        <add connectionStringName="DefaultConnection" applicationName="/"

name="Sitefinity" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess" />

      </providers>

</roleManager>

<membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType="">

      <providers>

        <clear/>

<add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/>

      </providers>

</membership>

 

Any help would be much appreciated
 

 

Posted by Community Admin on 29-Jan-2013 00:00

Hello,

Thank you for the detailed information provided.

Please note that there is a significant difference between project on 3.6 and 5.2. Could you please be more specific on what are you trying to achieve? If you need to delete user profile - please follow this help article.

Regards,
Veronica Milcheva
the Telerik team

Posted by Community Admin on 30-Jan-2013 00:00

Thanks for your reply Veronica.

I see where I was going wrong, as I mentioned I was using the legacy security dll (Telerik.Security) from the v3.7sp2 site when I should have been using Telerik.Sitefinity.Security.

Sorry, that was not clear to me.

cheers

Posted by Community Admin on 30-Jan-2013 00:00

Hello,

I am glad that now it is clear for you.

Please feel free to ask me if you have further questions.

All the best,
Veronica Milcheva
the Telerik team

This thread is closed