+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / SF 4.4 to 5.0 upgrade error

SF 4.4 to 5.0 upgrade error

50 posts, 1 answered
  1. Bart
    Bart avatar
    8 posts
    Registered:
    17 Feb 2011
    20 Mar 2012
    Link to this post
    I had the same problem and I got mine working by adding authenticationMode="Forms" to my security config file In the securityConfig line

    Seems like the upgrade enabled claims authentication by default but without the claims configuration in the web.config it was causing the site to break
  2. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    23 Mar 2012
    Link to this post
    has anyone with the SF libraries error gotten it to work?
    Thanks
  3. Dawn
    Dawn avatar
    37 posts
    Registered:
    17 Sep 2012
    23 Mar 2012
    Link to this post
    I am still working with Telerik support to resolve this issue on my end and I hope to post it here when I finally get it to work.

    I just know for now, this is a showstopper for me as my site upgrade project is completely roadblocked.
  4. SVA Webmaster
    SVA Webmaster avatar
    85 posts
    Registered:
    18 Jul 2007
    26 Mar 2012
    Link to this post
    @ Kristian - Thanks! That did the trick!
  5. Swati
    Swati avatar
    9 posts
    Registered:
    19 Apr 2011
    29 Mar 2012
    Link to this post
    I am getting another error when I run the upgraded project.

    Type 'Telerik.Sitefinity.Security.SitefinityIdentity' in assembly 'Telerik.Sitefinity, Version=5.0.2523.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' is not marked as serializable.

    Please help. I tried to change web.config, but no use.

    Thanks,
    Swati Bhatia
  6. Swati
    Swati avatar
    9 posts
    Registered:
    19 Apr 2011
    29 Mar 2012
    Link to this post
    Hi Again,
    I have tried to change both httpmodules and and modules sections in web.config. Added claims section to it. Now its showing object ref error for claims section when i run project.

  7. Sebastian
    Sebastian avatar
    21 posts
    Registered:
    06 Sep 2011
    29 Mar 2012
    Link to this post
    I am getting this error

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Could not load type 'Telerik.Sitefinity.Security.Claims.CustomRequestValidator' from assembly 'Telerik.Sitefinity'.

    Source Error:

    Line 34: Line 35: Line 36: <httpRuntime maxRequestLength="102400" requestValidationType="Telerik.Sitefinity.Security.Claims.CustomRequestValidator, Telerik.Sitefinity" /> Line 37: <siteMap defaultProvider="SitefinitySiteMap"> Line 38: <providers>
  8. RickC
    RickC avatar
    24 posts
    Registered:
    23 Apr 2003
    30 Mar 2012
    Link to this post
    I know that people continue to have problems with this, in part because of less than stellar documentation on what the Web.config should look like for Forms Authentication vs Claims Authentication. Telerik should publish clean versions of both Web.configs for users since there are many differences which are not covered in the documentation and it requires a line by line comparison in Web.config to see the differences.

    I will post what I THINK are the correct Web.config files. This is based on my comparison of what a new 5.0 Project Web.config looks like with Claims Authentication vs my 4.4 site converted to 5.0 Web.config where I am still using Forms Authentication. I have gotten Forms Authentication to work in 5.0 but have not tried Claims Authentication. PLEASE TELERIK SUPPORT, correct my post if it is incorrect and PLEASE post the completes instructions for both Web.config files at http://www.sitefinity.com/documentation/documentationarticles/installation-and-administration-guide/upgrade

    It is inexcusable that users are having these problems not from bugs but from inadequate documentation. This should be fixed IMMEDIATELY.

    FORMS AUTHENTICATION WEB.CONFIG (only showing differences from Claims Authentication Web.config). You'll need to find the correct locations in your Web.config

    <configuration>
    <configSections>
    <sectionGroup name="madam">
    <section requirePermission="false" name="formsAuthenticationDisposition" type="Telerik.Sitefinity.Utilities.MS.Madam.FormsAuthenticationDispositionSectionHandler, Telerik.Sitefinity.Utilities" />
    <section requirePermission="false" name="basicAuthentication" type="Telerik.Sitefinity.Utilities.MS.Madam.FormsAuthenticationDispositionSectionHandler, Telerik.Sitefinity.Utilities" />
    <section requirePermission="false" name="userSecurityAuthority" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    </sectionGroup>
     
     
    <system.web>
    <httpRuntime maxRequestLength="102400" />
     
     
    <authentication mode="Forms" />
     
     
    </system.webServer>
    <madam>
    <userSecurityAuthority realm="Sitefinity" provider="Telerik.Sitefinity.Utilities.MS.Madam.FormsUserSecurityAuthority" exposeClearTextPassword="false " />
    <formsAuthenticationDisposition>
    <discriminators all="1">
    <!-- This discriminator helps detect redirection to the Forms login page. -->
    <discriminator inputExpression="Response.RedirectLocation" pattern="login.aspx\?returnurl\=" type="Telerik.Sitefinity.Utilities.MS.Madam.RegexDiscriminator" />
    <discriminator type="Telerik.Sitefinity.Utilities.MS.Madam.Discriminator" all="false">
    <discriminator inputExpression="Request.Url" pattern="atompub/.*" type="Telerik.Sitefinity.Utilities.MS.Madam.RegexDiscriminator" />
    </discriminator>
    </discriminators>
    </formsAuthenticationDisposition>
    <basicAuthentication>
    <discriminators all="1">
    <discriminator type="Telerik.Sitefinity.Utilities.MS.Madam.Discriminator" all="false">
    <discriminator inputExpression="Request.Url" pattern="atompub/.*" type="Telerik.Sitefinity.Utilities.MS.Madam.RegexDiscriminator" />
    </discriminator>
    </discriminators>
    </basicAuthentication>
    </madam>


    CLAIMS AUTHENTICATION WEB.CONFIG (only showing differences from Forms Authentication Web.config - I have not tested this since I am still using Forms Authentication). You'll need to find the correct locations in your Web.config

    <system.web>
    <httpRuntime maxRequestLength="102400" requestValidationType="Telerik.Sitefinity.Security.Claims.CustomRequestValidator, Telerik.Sitefinity" />
     
     
    <authentication mode="None" />
     
    <httpModules>
    <remove name="FormsAuthentication"/>
    <remove name="RoleManager"/>
    <add name="ClaimsPrincipalHttpModule" type="Microsoft.IdentityModel.Web.ClaimsPrincipalHttpModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <add name="SitefinityClaimsAuthenticationModule" type="Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule, Telerik.Sitefinity" />
    <add name="SessionAuthenticationModule" type="Telerik.Sitefinity.Security.Claims.SitefinitySessionAuthenticationModule, Telerik.Sitefinity"/>
     
     
     
    <system.webServer>
     
    <remove name="FormsAuthentication"/>
    <remove name="RoleManager"/>
    <add name="ClaimsPrincipalHttpModule" type="Microsoft.IdentityModel.Web.ClaimsPrincipalHttpModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add name="SitefinityClaimsAuthenticationModule" type="Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule, Telerik.Sitefinity" />
    <add name="SessionAuthenticationModule" type="Telerik.Sitefinity.Security.Claims.SitefinitySessionAuthenticationModule, Telerik.Sitefinity" />
     
     
    </system.webServer>
     
    <microsoft.identityModel>
    <service>
    <claimsAuthenticationManager type="Telerik.Sitefinity.Security.Claims.SFClaimsAuthenticationManager, Telerik.Sitefinity" />
    <securityTokenHandlers>
    <add type="Telerik.Sitefinity.Security.Claims.SWT.SWTSecurityTokenHandler, Telerik.Sitefinity" />
    </securityTokenHandlers>
    <audienceUris mode="Never"></audienceUris>
    <federatedAuthentication>
    <wsFederation passiveRedirectEnabled="true" issuer="http://localhost" realm="http://localhost" requireHttps="false" />
    <cookieHandler requireSsl="false" />
    </federatedAuthentication>
    <issuerNameRegistry type="Telerik.Sitefinity.Security.Claims.CustomIssuerNameRegistry, Telerik.Sitefinity">
    <trustedIssuers></trustedIssuers>
    </issuerNameRegistry>
    <issuerTokenResolver type="Telerik.Sitefinity.Security.Claims.SWT.WrapIssuerTokenResolver, Telerik.Sitefinity"/>
    </service>
    </microsoft.identityModel>

  9. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    02 Apr 2012
    Link to this post
    Hello Rick,

    Thank you for the sharing your experience with the community.

    The logic in your configs seem to be correct, however I am attaching an archive with the webconfigs from two working projects on our end:

    1. One is upgraded from 4.4 to 5.0 without making any changes to the webconfig, working on Forms authentication.

    2. The other one is from brand new Sitefinity 5.0 project, which by default uses Claims authentication.

    Greetings,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. RickC
    RickC avatar
    24 posts
    Registered:
    23 Apr 2003
    03 Apr 2012
    Link to this post
    Victor, thanks for posting the Web.config files. It would also be extremely helpful to update the Documentation on Upgrading from 4.4 to 5.0 so that users understand the differences.

    RIck
  11. Sebastian
    Sebastian avatar
    21 posts
    Registered:
    06 Sep 2011
    03 Apr 2012
    Link to this post
    Victor
    That fixed my problem.
    Thanks!
    Sebastian
  12. Dawn
    Dawn avatar
    37 posts
    Registered:
    17 Sep 2012
    05 Apr 2012
    Link to this post
    For those getting the error:
    There is already an object named 'sf_libraries' in the database

    According to Telerik support I had three tables in my database named like this:
    sf_Events, sf_Libraries and sf_Blogs 

    Apparently Sitefinity thinks these are entirely new tables and:
    "Therefore the system was trying to create the new tables - sf_events and sf_libraries but they are identical ( regarding the length and the symbols ), therefore the error was thrown."

    So there you have it. I hope someone finds this helpful.
  13. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    06 Apr 2012
    Link to this post
    Hi,
    Already made ten updates version since january 2011, only two have passed without problem.

    For this one we can't access to backend site, with an exception:
    [NullReferenceException: Object reference not set to an instance of an object.]
       Telerik.Sitefinity.Security.Claims.ClaimsResolver.GetBasicAuthHeader(HttpContext context) +90
       Telerik.Sitefinity.Security.Claims.ClaimsResolver.SetAuthenticationHeaders(HttpContext context, Boolean includeBasicAuth) +75
       Telerik.Sitefinity.Security.Claims.ClaimsResolver.SendUnauthorizedResponse(HttpContext context, Boolean returnLoginForm, Boolean includeBasicAuth) +93
       Telerik.Sitefinity.Security.Claims.ClaimsResolver.SendUnauthorizedResponse(HttpContextBase context, Boolean returnLoginForm, Boolean includeBasicAuth) +189
       Telerik.Sitefinity.Security.Claims.ClaimsManager.SendUnauthorizedResponse(HttpContextBase context, Boolean returnLoginForm, Boolean includeBasicAuth) +52
       Telerik.Sitefinity.Security.Claims.ProtectedRoute.GetRouteData(HttpContextBase httpContext) +350
       System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +285
       System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +60
       System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +86
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

    But we already change web.config file with Victor's file.

    As Boromir can say:


    Regards,
    Nicolas
  14. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    09 Apr 2012
    Link to this post
    Hello Nicolas,

    Which authentication mode did you choose for your website? Did you go for the new Claims authentication or  remained with forms?

    Regards,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  15. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    10 Apr 2012
    Link to this post
    Hi,
    we stay on Form Authentification, but we have a custom membership provider. So we used the web.config that you give in zip file (web44to50clean.config).

    First time I report our modification but it doesn't work (exception Claims) so I removed it and disable our custom membership in SecurityConfig.config but it doesn't change anything.

    Regards,
    Nicolas
  16. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    11 Apr 2012
    Link to this post
    Hi,
    I think config files are not updated correctly. I will explain, I modify my SecurityConfig manually for add a parameter authenticationMode="Forms" in <securityConfig ...> and it allows me to access backend. But I can't navigate into backend because I obtains numerous configuration errors.



    Regards,
    Nicolas
  17. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    11 Apr 2012
    Link to this post
    Ok I rollback all my config files, run application for update it. Add manually property in SecurityConfig and it works.

    Regards,
    Nicolas
  18. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    13 Apr 2012
    Link to this post
    Hi,
    so my version is on sf 5.0.2523.0 but there is a little surprise. The application works only if it has been compiled on debug mode.

    If we run it in release we obtains this exception:
    [ProviderException: No collection element matches the given key in a remove operation.]
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadCollectionElement(ConfigElementCollection collection, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo) +1585
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo, Boolean isNew, Boolean validateTagName) +219
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadPropertyElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo) +376
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo, Boolean isNew, Boolean validateTagName) +244
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo& upgradingInfo) +214
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade) +101
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName) +53
       Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy) +153
       Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider) +16
       Telerik.Sitefinity.Configuration.Config.Get(Boolean safeMode) +164
       Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes(RouteCollection routes) +777
       Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +250
       Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +116
       System.Web.Routing.UrlRoutingModule.System.Web.IHttpModule.Init(HttpApplication application) +10
       System.Web.HttpApplication.InitModulesCommon() +80
       System.Web.HttpApplication.InitModules() +43
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +828
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +304
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327


    Regards,
    Nicolas
  19. jofy
    jofy avatar
    4 posts
    Registered:
    02 Aug 2011
    17 May 2012
    Link to this post

  20. Chris Hayward
    Chris Hayward avatar
    36 posts
    Registered:
    17 Dec 2009
    25 Sep 2012
    Link to this post
    Commenting on this post incase it helps in the future for anyone.

    We had a similar problem/error.

    I started a brand new sitefinity 5.0 project and looked at the web config.  Considerably different than the project i upgraded.

    I compared the two line section by section and updated my web config to the modern version, and everything works fine.


50 posts, 1 answered
1 2