It appears urlSegmentOptions.ReservedSegments is null. It should have been set using SetDefaultValues(), but you can work around by adding the settings for it, the default value is
{"bin", "app_code", "app_globalresources", "app_localresources", "app_webreferences", "app_data", "app_browsers"}
Added this:
services.Configure<UrlSegmentOptions>(_configuration => _configuration.ReservedSegments = new List<string>
{
"bin",
"app_code",
"app_globalresources",
"app_localresources",
"app_webreferences",
"app_data",
"app_browsers"
});
But still the same error. Strange. Could it be some old routing code still left from CMS 11 or something?
Thanks!
Could you start your site in debug mode and uncheck just my code option, to see if you can see which parameter is null?
i just dug into it and SetDefaultValues should be called before ValidationService.Initialize, so I'm not sure what is wrong here
Unchecking Just My Code didn't give me anything differentm but I see that I did not send you this before:
ArgumentNullException: Value cannot be null. Arg_ParamName_Name
Does that say anything?
Wish I had a better thing to say but it seems you need to contact developer support service. if this is reproduced it would be much easier to diagnose
Took me longer than expected, but (as I commented in the ticket), this was because of your IriConfigurationModule
context.Services.RemoveAll<UrlSegmentOptions>();
context.Services.AddSingleton(typeof(UrlSegmentOptions), s => new UrlSegmentOptions
{ SupportIriCharacters = true, ValidCharacters = @"\p\{L}0-9-_~\.\$" + validChars,
UseLowercase = true
});
you can set the ReservedSegments here as you wish
this happens after the Configure which is why it overrides the setting you added, but before any Initialize which is when the ValidationService is called (and caused your exception)
Thanks Quan! I'm not sure why this is used actually but I will remove the file and move it ot Startup.cs
Hi!
After upgrade to CMS 12 I get this excpetion on startup?
Any ideas?
Thanks!
/Kristoffer