Ensures that the thread culture is set both in owin and in aspnet
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.Routing;
|
||||
using LightInject;
|
||||
@@ -15,6 +17,7 @@ using Umbraco.Web.Security;
|
||||
using Umbraco.Core.Collections;
|
||||
using Umbraco.Core.Exceptions;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.PublishedCache;
|
||||
@@ -562,6 +565,13 @@ namespace Umbraco.Web
|
||||
}
|
||||
};
|
||||
|
||||
app.PostAuthenticateRequest += (sender, e) =>
|
||||
{
|
||||
var httpContext = ((HttpApplication) sender).Context;
|
||||
//ensure the thread culture is set
|
||||
httpContext.User?.Identity?.EnsureCulture();
|
||||
};
|
||||
|
||||
app.PostResolveRequestCache += (sender, e) =>
|
||||
{
|
||||
var httpContext = ((HttpApplication) sender).Context;
|
||||
|
||||
Reference in New Issue
Block a user