However a 500 page is returned in every case, even where a 404 page should be returned. Both of the ID's in the path="" are ID's of my 404 and 500 pages respectively, in the backoffice.
In the log viewer I get this error:
System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at Umbraco.Core.Configuration.UmbracoSettings.ContentErrorsElement.get_Error404Collection() in D:\a\1\s\src\Umbraco.Core\Configuration\UmbracoSettings\ContentErrorsElement.cs:line 13
at Umbraco.Core.Configuration.UmbracoSettings.ContentElement.get_Error404Collection() in D:\a\1\s\src\Umbraco.Core\Configuration\UmbracoSettings\ContentElement.cs:line 17
at Umbraco.Web.Routing.ContentFinderByConfigured404.TryFindContent(PublishedRequest frequest) in D:\a\1\s\src\Umbraco.Web\Routing\ContentFinderByConfigured404.cs:line 57
at Umbraco.Web.Routing.PublishedRouter.HandlePublishedContent(PublishedRequest request) in D:\a\1\s\src\Umbraco.Web\Routing\PublishedRouter.cs:line 459
at Umbraco.Web.Routing.PublishedRouter.FindPublishedContentAndTemplate(PublishedRequest request) in D:\a\1\s\src\Umbraco.Web\Routing\PublishedRouter.cs:line 398
at Umbraco.Web.Routing.PublishedRouter.PrepareRequest(PublishedRequest request) in D:\a\1\s\src\Umbraco.Web\Routing\PublishedRouter.cs:line 131
at Umbraco.Web.UmbracoInjectedModule.ProcessRequest(HttpContextBase httpContext) in D:\a\1\s\src\Umbraco.Web\UmbracoInjectedModule.cs:line 134
at Umbraco.Web.UmbracoInjectedModule.<Init>b__18_4(Object sender, EventArgs e) in D:\a\1\s\src\Umbraco.Web\UmbracoInjectedModule.cs:line 414
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
your 404 should be set up in
config\umbracosettings.config, as it is handled by Umbraco, then set up your other error handling like below (you need both sets for it to work correctly)
500 page is returned where a 404 page should be returned
Hi, I've set up my custom error pages as such in my web config files:
However a 500 page is returned in every case, even where a 404 page should be returned. Both of the ID's in the path="" are ID's of my 404 and 500 pages respectively, in the backoffice.
In the log viewer I get this error:
Any advice how to move forward?
your 404 should be set up in config\umbracosettings.config, as it is handled by Umbraco, then set up your other error handling like below (you need both sets for it to work correctly)
set the paths to whatever your path should be
is working on a reply...