+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. SVA Webmaster
    SVA Webmaster avatar
    85 posts
    Registered:
    18 Jul 2007
    05 Mar 2012
    Link to this post
    I followed the instructions for upgrading to 5.0 from 4.4 on http://www.sitefinity.com/documentation/documentationarticles/installation-and-administration-guide/upgrade with no issues. Upon browsing the site for the first time, I got the following error below ("The given key was not present in the dictionary") and can't browse the site.

    Log Name:      Application
    Source:        ASP.NET 4.0.30319.0
    Date:          3/5/2012 4:30:33 PM
    Event ID:      1309
    Task Category: Web Event
    Level:         Warning
    Keywords:      Classic
    User:          N/A
    Computer:      SVAIISDEV.svamain.loc
    Description:
    Event code: 3005 
    Event message: An unhandled exception has occurred. 
    Event time: 3/5/2012 4:30:33 PM 
    Event time (UTC): 3/5/2012 10:30:33 PM 
    Event ID: afa0df6a326c47fa9858c24c800d3017 
    Event sequence: 2 
    Event occurrence: 1 
    Event detail code: 0 
     
    Application information: 
        Application domain: /LM/W3SVC/1/ROOT-2-129754602311759723 
        Trust level: Full 
        Application Virtual Path: / 
        Application Path: E:\Websites\sfsandbox.sva.com\ 
        Machine name: SVAIISDEV 
     
    Process information: 
        Process ID: 2772 
        Process name: w3wp.exe 
        Account name: IIS APPPOOL\sfsandbox.sva.com 
     
    Exception information: 
        Exception type: KeyNotFoundException 
        Exception message: The given key was not present in the dictionary.
       at Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy, Exception& exceptionToThrow)
       at Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo& upgradingInfo)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName)
       at Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy)
       at Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider)
       at Telerik.Sitefinity.Configuration.Config.Get[TSection](Boolean safeMode)
       at Telerik.Sitefinity.Abstractions.ObjectFactory.ConfigureCaching(ConfigurationSourceBuilder configBuilder)
       at Telerik.Sitefinity.Abstractions.ObjectFactory.RegisterIoCTypes()
       at Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap()
       at Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)


     
     
    Request information: 
        Request URL: http://sfsandbox.sva.com/sitefinity 
        Request path: /sitefinity 
        User host address: 10.20.100.134 
        User:  
        Is authenticated: False 
        Authentication Type:  
        Thread account name: IIS APPPOOL\sfsandbox.sva.com 
     
    Thread information: 
        Thread ID: 6 
        Thread account name: IIS APPPOOL\sfsandbox.sva.com 
        Is impersonating: False 
        Stack trace:    at Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy, Exception& exceptionToThrow)
       at Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo& upgradingInfo)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName)
       at Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy)
       at Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider)
       at Telerik.Sitefinity.Configuration.Config.Get[TSection](Boolean safeMode)
       at Telerik.Sitefinity.Abstractions.ObjectFactory.ConfigureCaching(ConfigurationSourceBuilder configBuilder)
       at Telerik.Sitefinity.Abstractions.ObjectFactory.RegisterIoCTypes()
       at Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap()
       at Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
     
     
    Custom event details: 


    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="ASP.NET 4.0.30319.0" />
        <EventID Qualifiers="32768">1309</EventID>
        <Level>3</Level>
        <Task>3</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2012-03-05T22:30:33.000000000Z" />
        <EventRecordID>8705</EventRecordID>
        <Channel>Application</Channel>
        <Computer>SVAIISDEV.svamain.loc</Computer>
        <Security />
      </System>
      <EventData>
        <Data>3005</Data>
        <Data>An unhandled exception has occurred.</Data>
        <Data>3/5/2012 4:30:33 PM</Data>
        <Data>3/5/2012 10:30:33 PM</Data>
        <Data>afa0df6a326c47fa9858c24c800d3017</Data>
        <Data>2</Data>
        <Data>1</Data>
        <Data>0</Data>
        <Data>/LM/W3SVC/1/ROOT-2-129754602311759723</Data>
        <Data>Full</Data>
        <Data>/</Data>
        <Data>E:\Websites\sfsandbox.sva.com\</Data>
        <Data>SVAIISDEV</Data>
        <Data>
        </Data>
        <Data>2772</Data>
        <Data>w3wp.exe</Data>
        <Data>IIS APPPOOL\sfsandbox.sva.com</Data>
        <Data>KeyNotFoundException</Data>
        <Data>The given key was not present in the dictionary.
       at Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy, Exception&amp; exceptionToThrow)
       at Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo&amp; upgradingInfo)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName)
       at Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy)
       at Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider)
       at Telerik.Sitefinity.Configuration.Config.Get[TSection](Boolean safeMode)
       at Telerik.Sitefinity.Abstractions.ObjectFactory.ConfigureCaching(ConfigurationSourceBuilder configBuilder)
       at Telerik.Sitefinity.Abstractions.ObjectFactory.RegisterIoCTypes()
       at Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap()
       at Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)


    </Data>
        <Data>http://sfsandbox.sva.com/sitefinity</Data>
        <Data>/sitefinity</Data>
        <Data>10.20.100.134</Data>
        <Data>
        </Data>
        <Data>False</Data>
        <Data>
        </Data>
        <Data>IIS APPPOOL\sfsandbox.sva.com</Data>
        <Data>6</Data>
        <Data>IIS APPPOOL\sfsandbox.sva.com</Data>
        <Data>False</Data>
        <Data>   at Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy, Exception&amp; exceptionToThrow)
       at Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo&amp; upgradingInfo)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade)
       at Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName)
       at Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy)
       at Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider)
       at Telerik.Sitefinity.Configuration.Config.Get[TSection](Boolean safeMode)
       at Telerik.Sitefinity.Abstractions.ObjectFactory.ConfigureCaching(ConfigurationSourceBuilder configBuilder)
       at Telerik.Sitefinity.Abstractions.ObjectFactory.RegisterIoCTypes()
       at Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap()
       at Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
    </Data>
      </EventData>
    </Event>
  2. Chris
    Chris avatar
    5 posts
    Registered:
    24 Oct 2011
    06 Mar 2012
    Link to this post
    I'm also seeing this exact error this morning when doing an upgrade from 4.4 to 5.0. 
    Looks like I will have to roll back to 4.4 for now. 

    Edit: I ran through the instructions again, and this time I get a different error:

    Log Name:      Application
    Source:        ASP.NET 4.0.30319.0
    Date:          3/6/2012 3:23:57 PM
    Event ID:      1309
    Task Category: Web Event
    Level:         Warning
    Keywords:      Classic
    User:          N/A
    Computer:      tenerife.hypnotic.net
    Description:
    Event code: 3005 
    Event message: An unhandled exception has occurred. 
    Event time: 3/6/2012 3:23:57 PM 
    Event time (UTC): 3/6/2012 3:23:57 PM 
    Event ID: 27fc01c0204447bf9ae8301ef021e55f 
    Event sequence: 2 
    Event occurrence: 1 
    Event detail code: 0 
     
    Application information: 
        Application domain: /LM/W3SVC/22/ROOT-6-129755210376703647 
        Trust level: Full 
        Application Virtual Path: / 
        Application Path: C:\HostingSpaces\chilitechno\beta.chilitechno.com\wwwroot\ 
        Machine name: TENERIFE 
     
    Process information: 
        Process ID: 4448 
        Process name: w3wp.exe 
        Account name: IIS APPPOOL\ASP.NET v4.0 
     
    Exception information: 
        Exception type: NullReferenceException 
        Exception message: Object reference not set to an instance of an object.
       at Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.InitializePropertiesFromConfiguration(String serviceName)
       at Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.InitializeModule(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

     
     
    Request information: 
        Request URL: http://www.chilitechno.com/ 
        Request path: / 
        User host address: 66.65.12.83 
        User:  
        Is authenticated: False 
        Authentication Type:  
        Thread account name: IIS APPPOOL\ASP.NET v4.0 
     
    Thread information: 
        Thread ID: 15 
        Thread account name: IIS APPPOOL\ASP.NET v4.0 
        Is impersonating: False 
        Stack trace:    at Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.InitializePropertiesFromConfiguration(String serviceName)
       at Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.InitializeModule(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
     
     
    Custom event details: 

    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="ASP.NET 4.0.30319.0" />
        <EventID Qualifiers="32768">1309</EventID>
        <Level>3</Level>
        <Task>3</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2012-03-06T15:23:57.000000000Z" />
        <EventRecordID>29492</EventRecordID>
        <Channel>Application</Channel>
        <Computer>tenerife.hypnotic.net</Computer>
        <Security />
      </System>
      <EventData>
        <Data>3005</Data>
        <Data>An unhandled exception has occurred.</Data>
        <Data>3/6/2012 3:23:57 PM</Data>
        <Data>3/6/2012 3:23:57 PM</Data>
        <Data>27fc01c0204447bf9ae8301ef021e55f</Data>
        <Data>2</Data>
        <Data>1</Data>
        <Data>0</Data>
        <Data>/LM/W3SVC/22/ROOT-6-129755210376703647</Data>
        <Data>Full</Data>
        <Data>/</Data>
        <Data>C:\HostingSpaces\chilitechno\beta.chilitechno.com\wwwroot\</Data>
        <Data>TENERIFE</Data>
        <Data>
        </Data>
        <Data>4448</Data>
        <Data>w3wp.exe</Data>
        <Data>IIS APPPOOL\ASP.NET v4.0</Data>
        <Data>NullReferenceException</Data>
        <Data>Object reference not set to an instance of an object.
       at Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.InitializePropertiesFromConfiguration(String serviceName)
       at Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.InitializeModule(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

    </Data>
        <Data>http://www.chilitechno.com/</Data>
        <Data>/</Data>
        <Data>66.65.12.83</Data>
        <Data>
        </Data>
        <Data>False</Data>
        <Data>
        </Data>
        <Data>IIS APPPOOL\ASP.NET v4.0</Data>
        <Data>15</Data>
        <Data>IIS APPPOOL\ASP.NET v4.0</Data>
        <Data>False</Data>
        <Data>   at Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.InitializePropertiesFromConfiguration(String serviceName)
       at Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.InitializeModule(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
    </Data>
      </EventData>
    </Event>
  3. SVA Webmaster
    SVA Webmaster avatar
    85 posts
    Registered:
    18 Jul 2007
    06 Mar 2012
    Link to this post
    Chris,

    I too went back through and instead of merging the new http/module entries in the upgrade instructions with what was already in the web.config, I replaced it. I now get the same exact error you got your 2nd time around having something to do with the Claims Module.
  4. Nidhi
    Nidhi avatar
    40 posts
    Registered:
    20 Jul 2010
    06 Mar 2012
    Link to this post
    I am getting the same error. I also replaced the module entries because the documentation clearly stated that "The final section should look like this:".
    Seems to be something to do with their Claims Module.

    For one of my sites, I don't need the new windows authentication stuff, so I just reverted back my module entries and the website works fine for now. So I'm not sure if the changes in the module entries are mandatory or not.
    For another site, when I remove it, I get a different "Type FeaturedEvent.FeaturedEvent cannot be resolved." error.
  5. SVA Webmaster
    SVA Webmaster avatar
    85 posts
    Registered:
    18 Jul 2007
    06 Mar 2012
    Link to this post
    I don't use windows auth either, so I reverted to my old module entries and get a new error: 

    [KeyNotFoundException: The given key was not present in the dictionary.]
       Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy, Exception& exceptionToThrow) +239
       Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy) +23
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo& upgradingInfo) +542
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade) +138
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName) +81
       Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy) +194
       Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider) +30
       Telerik.Sitefinity.Configuration.Config.Get(Boolean safeMode) +272
       Telerik.Sitefinity.Abstractions.ObjectFactory.ConfigureCaching(ConfigurationSourceBuilder configBuilder) +201
       Telerik.Sitefinity.Abstractions.ObjectFactory.RegisterIoCTypes() +302
       Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +232
       Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +116
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +546
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +325
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375
    
    [HttpException (0x80004005): The given key was not present in the dictionary.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11529072
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4784373
  6. Nidhi
    Nidhi avatar
    40 posts
    Registered:
    20 Jul 2010
    06 Mar 2012
    Link to this post
    Craig,

    I just found out that the type error I was getting was something on my end. I was missing a custom  file.
    I fixed that problem and reverted my module entries to old ones (without the authentication stuff) and it works fine now. So maybe the error you are getting is also somewhere in your code, maybe you created some custom stuff which got messed up after upgrade.
  7. Richard Baugh
    Richard Baugh avatar
    201 posts
    Registered:
    22 Aug 2012
    06 Mar 2012
    Link to this post
    My initial attempt to upgrade a 4.4 site resulted in the same error. I don't really have any customization to the web.config file so I just replaced my whole web.config and the site was able to continue with the upgrade.

    I think there might be one more section that needs to be added to the web.config file:
    <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>

    This is added to the bottom of the web.config file just before the WindowsAzure telerik element. Some will have this commented out and others will not, just depends on whether you are deployed on Windows Azure or not.

    I haven't dissected the web.config file any more that that. Most everything else looks ok at a quick glance.
  8. Chris
    Chris avatar
    5 posts
    Registered:
    24 Oct 2011
    06 Mar 2012
    Link to this post
    I tried using the stock web.config from a newly created project and I still get an error:

    [KeyNotFoundException: The given key was not present in the dictionary.]
       Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy, Exception& exceptionToThrow) +239
       Telerik.Sitefinity.Abstractions.Exceptions.HandleException(Exception exceptionToHandle, ExceptionPolicyName policy) +23
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo& upgradingInfo) +542
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade) +138
       Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName) +81
       Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy) +194
       Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider) +30
       Telerik.Sitefinity.Configuration.Config.Get(Boolean safeMode) +272
       Telerik.Sitefinity.Abstractions.ObjectFactory.ConfigureCaching(ConfigurationSourceBuilder configBuilder) +201
       Telerik.Sitefinity.Abstractions.ObjectFactory.RegisterIoCTypes() +302
       Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +232
       Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +116
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +575
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +352
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375
    
    [HttpException (0x80004005): The given key was not present in the dictionary.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11697344
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4865861
  9. Richard Baugh
    Richard Baugh avatar
    201 posts
    Registered:
    22 Aug 2012
    06 Mar 2012
    Link to this post
    If you had already tried to upgrade it before applying the stock web.config, you might try and override all of the config files in the App_Data/Sitefinity/Configuration folder with the ones from you previous running site. I had to do this on mine as well. I wasn't getting any errors, just a timeout.

    Not sure if it will help, just something I did on my upgrade that helped me along. 
  10. Chris
    Chris avatar
    5 posts
    Registered:
    24 Oct 2011
    06 Mar 2012
    Link to this post
    I opened a support ticket. It doesn't seem like I should have to muck about in the Configuration folder to get an upgrade from 4.4 to 5.0 to work. Seems like that's just inviting more problems. 
    For now I've rolled back so that's good enough for me. 


  11. Richard Baugh
    Richard Baugh avatar
    201 posts
    Registered:
    22 Aug 2012
    06 Mar 2012
    Link to this post
    I wasn't meaning you needed to mess with them. When I initially tried to upgrade and got the error, some of my config files had been updated. So I just grabbed my original config files, the ones I archived, and then replaced the config files in the new 5.0 site.

    Hope you can get some resolution soon.
  12. SVA Webmaster
    SVA Webmaster avatar
    85 posts
    Registered:
    18 Jul 2007
    06 Mar 2012
    Link to this post
    Don't feel bad, Chris. I can't even get an empty clean install of 5.0 up on my Windows 2008 R2 server. I've tried all the things here and at best, given Richard's suggestion of overwriting with my original config files, including web.config, I can get the upgraded site to run fine on the front end. It crashes if I try to access the backend however with:

    [NullReferenceException: Object reference not set to an instance of an object.]
       Telerik.Sitefinity.Security.Claims.ClaimsResolver.GetBasicAuthHeader(HttpContext context) +47
       Telerik.Sitefinity.Security.Claims.ClaimsResolver.SetAuthenticationHeaders(HttpContext context, Boolean includeBasicAuth) +56
       Telerik.Sitefinity.Security.Claims.ClaimsResolver.SendUnauthorizedResponse(HttpContext context, Boolean returnLoginForm, Boolean includeBasicAuth) +175
       Telerik.Sitefinity.Security.Claims.ClaimsResolver.SendUnauthorizedResponse(HttpContextBase context, Boolean returnLoginForm, Boolean includeBasicAuth) +143
       Telerik.Sitefinity.Security.Claims.ProtectedRoute.GetRouteData(HttpContextBase httpContext) +319
       System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +369
       System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +74
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +265
  13. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    07 Mar 2012
    Link to this post
    I've been able to upgrade my sitefinity website from 4.4 to 5.0
    I've followed Richard instructions, so I have'nt changed web.config file, and the web site is working.
    Anybody nows what is the correct web.config configuration?

    Thanks
  14. Jenna Brenn
    Jenna Brenn avatar
    5 posts
    Registered:
    07 May 2010
    07 Mar 2012
    Link to this post
    I had the exact same error but was able to resolve it by replacing my 4.4 web config file with the default 5.0 file and working backward to place all of my custom 4.4 code back into the file.  I don't know what was missing to begin with, but doing it that way worked for me.
  15. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    07 Mar 2012
    Link to this post
    I am able to get to my login screen after upgrade and inclusion of the claims authentication module however I get a new error

    There is already an object named 'sf_libraries' in the database.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    any thoughts?

    Exception Details: Telerik.OpenAccess.RT.sql.SQLException: There is already an object named 'sf_libraries' in the database.

  16. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    08 Mar 2012
    Link to this post
    Hello Nana,

    The error you get is somehow strange as it appears that the system tries to insert a duplicate object with that name in the database. Can you tell us how did you proceed with upgrading your project? Any specific information that might help us get a better picture of the situation.

    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
  17. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    08 Mar 2012
    Link to this post
    I followed exact instructions on documentation. The only thing I did different was to put the httpmodules in the exact same order as specified by
    http://www.sitefinity.com/documentation/documentationarticles/switching-to-claims-based-authentication

    I have opened a support ticket. thanks
  18. Dawn
    Dawn avatar
    37 posts
    Registered:
    17 Sep 2012
    10 Mar 2012
    Link to this post
    I have the exact same error as Nana. I too followed the instructions in the documentation.
  19. eitan
    eitan avatar
    2 posts
    Registered:
    17 Apr 2008
    10 Mar 2012
    Link to this post
    Same here!
    The There is already an object named 'sf_libraries' in the database.
     Exception during the 4.4 migration to 5.0 happends when the upgrade script tries to sync the database.

    Can anyone from Telerik support team address this issue?
  20. RickC
    RickC avatar
    24 posts
    Registered:
    23 Apr 2003
    12 Mar 2012
    Link to this post
    Same problem as everyone else. I always create a Blank New Project when I upgrade to be able to compare files against my current version. From comparing the Blank Project Web.config to my 4.4 to 5.0 Upgraded Project Web.config there are lots on differences. It looks like the Upgrade from the Sitefinity Project Manager didn't properly correct the web.config. I'll try and list ALL the inconsistencies comparing section by section. You can see that the Upgrade DID NOT make lots of the changes shown in the Blank New Project. Of course, I have no idea which of these is causing the site not to load.

    BLANK
    <configuration>
      <configSections>
        <section requirePermission="false" name="microsoft.identityModel" type="Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>


    CONVERTED
    <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>

    BLANK
      <system.web>
        <httpRuntime maxRequestLength="102400" requestValidationType="Telerik.Sitefinity.Security.Claims.CustomRequestValidator, Telerik.Sitefinity" />

    CONVERTED
      <system.web>
         <httpRuntime maxRequestLength="102400" />

    BLANK
        <compilation debug="false" targetFramework="4.0">

    CONVERTED
        <compilation debug="false" defaultLanguage="c#" targetFramework="4.0">

    BLANK
       <authentication mode="None" />

    CONVERTED
       <authentication mode="Forms" />

    BLANK
    no AtomPubModule

    CONVERTED
          <add name="SitefinityAtompubModule" type="Telerik.Sitefinity.Security.SitefinityAtompubModule, Telerik.Sitefinity" />

    BLANK
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
    no AtomPubModule
          <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    CONVERTED
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
          <remove name="WebDAVModule" />
          <add name="SitefinityAtompubModule" type="Telerik.Sitefinity.Security.SitefinityAtompubModule, Telerik.Sitefinity" />

          <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    BLANK
    </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>

    CONVERTED
    </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>


  21. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    12 Mar 2012
    Link to this post
    Hi,

    If you are upgrading your site from previous versions of Sitefinity, you may need to add few sections of code to the webconfig, as explained in our documentation. Please note that you need to add those sections, after you have copied the dlls / or hit the upgrade button / but before restarting the project solution. We do not provide the webconfig changes, as we assume that you want to stay with the forms authentication method, instead of switching to 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
  22. Dawn
    Dawn avatar
    37 posts
    Registered:
    17 Sep 2012
    12 Mar 2012
    Link to this post
    My web.config definitely contains the sections the documentation required to be added and I was getting the error. That is why I posted here. 
  23. Gema
    Gema avatar
    46 posts
    Registered:
    02 Oct 2009
    12 Mar 2012
    Link to this post
    That's true.
    If you follow the documentation instructions, you get the web.config error.
  24. RickC
    RickC avatar
    24 posts
    Registered:
    23 Apr 2003
    12 Mar 2012
    Link to this post
    Victor, thanks for your reply. I think there are two Sitefinity problems here.

    First is that the documentation does NOT clearly state that you should ONLY add the Claims code IF you plan to use Claims Authentication.

    Here's what your Upgrade Instructions say
    "After the project manager upgrades your project you must merge your project’s web.config file with changes in the web.config file for the version of Sitefinity you are upgrading to. 
    In Sitefinity 5.0 there are introductions for Claims authentication. There are introductions in system.web/httpModules and system.webServer/modules configuration sections. Modify these sections, so that they have the new introductions as below:" - Where does it say do not include this if you want to continue to use Forms Authentication.

    The Second Problem is that if you are planning on using Claims Authentication there are a number of other lines in Web.Config that appear to be required (based on my BLANK 5.0 Project Web.config) which ARE NOT written to the Upgraded Web.config when it is converted and your Upgrade instructions don't include adding those lines into Web.config. So I don't see how it is possible to get an Upgraded 4.4 site to work properly with Claims Authentication without all the proper lines being in Web.config.

    I've looked at all the documentation carefully and it appears that you can switch back and forth between Forms and Claims Authentication from the Admin Panel so I presumed that all of the Claims authentication lines had to be added regardless of which you were using. If you look at
    http://www.sitefinity.com/documentation/documentationarticles/switching-to-claims-based-authentication
    It explains how to change from the Admin backend and how additional lines (that aren't listed in the Upgrade section) have to be added to Web.config.

    Then if you look at Switching to Forms Authentication at
    http://www.sitefinity.com/documentation/documentationarticles/switching-to-forms-authentication

    It says you just make changes to the Admin Backend through a Dropdown list.

    I must say this is all very confusing and not well documented. Please give us clear instructions on what is needed in Web.config for FORMS authentication and for CLAIMS authentication.

    I think this is a good reason why Telerik should adopt a Beta program for major Sitefinity Releases so that end users can test this stuff out and provide feedback to the Development Team before the product is officially released. I would be happy to do testing as long as I know I am a Beta tester. I prefer not to end up testing a released product.

    Rick
  25. RickC
    RickC avatar
    24 posts
    Registered:
    23 Apr 2003
    13 Mar 2012
    Link to this post
    I've gone back and compared my original unconverted 4.4 Web.config against the 5.0 Blank site Config to identify what new items show up from 5.0. I then went to my Converted 5.0 web.config, stripped out all of the Claims config items and my development site now loads properly.

    I think if the Upgrade Documentation can be changed to remove the Claims authenticate config items and instead instruct users that if they plan to use replace 4.4 Forms Authentication with 5.0 Claims Authentication that they should go to this page http://www.sitefinity.com/documentation/documentationarticles/switching-to-claims-based-authentication for instructions on how to update web.config and set up Claims authentication. That would prevent people from automatically merging this code when not necessary.
  26. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    13 Mar 2012
    Link to this post
    So can someone please help us with the SF_libraries error please.
  27. nana
    nana avatar
    49 posts
    Registered:
    07 Sep 2010
    13 Mar 2012
    Link to this post
    I have a question though for those of you who were sucessful, did you follow the upgrade chain

    for example
    4.1 -> 4.2 --> 4.3-->4.4 --> 5.0   ?

    and for those of us with the SF libraries error
    did you upgrade from
    4.2 --> 4.4 --> 5.0?

    In order words, did you skip an upgrade version?
  28. Kristian
    Kristian avatar
    214 posts
    Registered:
    03 Jun 2010
    15 Mar 2012
    Link to this post
    @Craig Brown, I ran into the same problem you did with the frontend working and the backend giving me the same error you posted. I replaced this portion in my web.config with the following from the empty project folder and it fixed the problem. I was missing the ClaimsPrincipalHttpModule module

    <modules runAllManagedModulesForAllRequests="true">
      <remove name="WebDAVModule" />
      <remove name="UrlRoutingModule" />
      <remove name="ScriptModule" />
      <remove name="RadUploadModule" />
      <remove name="Sitefinity" />
      <remove name="SitefinityAnalyticsModule" />
      <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="Sitefinity" type="Telerik.Sitefinity.Web.SitefinityHttpModule, Telerik.Sitefinity" />
      <add name="SessionAuthenticationModule" type="Telerik.Sitefinity.Security.Claims.SitefinitySessionAuthenticationModule, Telerik.Sitefinity" />
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" />
      <add name="SitefinityAnalyticsModule" type="Telerik.Sitefinity.Analytics.Server.DependencyResolution.Module.DependencyRegistrarHttpModule, Telerik.Sitefinity.Analytics.Server.DependencyResolution" />
    </modules>


    Answered
  29. YRMC InfoSys
    YRMC InfoSys avatar
    8 posts
    Registered:
    26 Oct 2010
    19 Mar 2012
    Link to this post
    Working now. Thank you.
  30. Dawn
    Dawn avatar
    37 posts
    Registered:
    17 Sep 2012
    19 Mar 2012
    Link to this post
    I haven't gotten it to work. I ultimately had to submit a support ticket. Hopefully that will help. 
50 posts, 1 answered
1 2