SF 4.4 to 5.0 upgrade error
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: 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="schemas.microsoft.com/.../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& 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)
</Data>
<Data>sfsandbox.sva.com/.../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& 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)
</Data>
</EventData>
</Event>
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.
Chris,
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.
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
Craig,
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.
<
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
>
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
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.
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.
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.
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
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
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.
I am able to get to my login screen after upgrade and inclusion of the claims authentication module however I get a new error
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
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
I have the exact same error as Nana. I too followed the instructions in the documentation.
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.
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>
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
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.
That's true.
If you follow the documentation instructions, you get the web.config error.
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
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.
So can someone please help us with the SF_libraries error please.
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?
@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
>
Working now. Thank you.
I haven't gotten it to work. I ultimately had to submit a support ticket. Hopefully that will help.
I had the same problem and I got mine working by adding authenticationMode="Forms" to my security config file In the securityConfig line
has anyone with the SF libraries error gotten it to work?
Thanks
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.
@ Kristian - Thanks! That did the trick!
I am getting another error when I run the upgraded project.
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.
I am getting this error
|
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 www.sitefinity.com/.../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
>
<
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
>
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
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
Victor
That fixed my problem.
Thanks!
Sebastian
For those getting the error:
There is already an object named 'sf_libraries' in the database
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
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
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
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
Ok I rollback all my config files, run application for update it. Add manually property in SecurityConfig and it works.
Regards,
Nicolas
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
Commenting on this post incase it helps in the future for anyone.