I have an average owin service level that works very well.
It just changes the culture according to the URL. This works in 4.5. * Well. Now that runtiome has been changed to 4.6.1, the culture is no longer saved, and as a result, it just doesn't work.
I can reproduce it in a very simple solution that only this middleware has to simulate cultural change
public class CultureMiddleware : OwinMiddleware { public CultureMiddleware(OwinMiddleware next) : base(next) { } public override async Task Invoke(IOwinContext context) { var culture = new CultureInfo("es-ES"); Thread.CurrentThread.CurrentCulture = culture; Thread.CurrentThread.CurrentUICulture = culture; CultureInfo.CurrentCulture = culture; CultureInfo.CurrentUICulture = culture; await Next.Invoke(context); } }
I attach the middleware to the pipeline that it executes, but when I invoke the action, the controller has no culture (e.g. in .net 4.5.1)
I already wrote here, but support is very slow. One answer every two weeks, and then it seems that they have not tried what they write: - (
https://connect.microsoft.com/VisualStudio/feedback/details/2455357
source share