I have an owin culture middle ware running very nice.
It just changes the culture according to the url. This works in 4.5.* perfectly. Now when the runtiome is changed to 4.6.1, the culture isn't preserved anymore and as a result it just doesn't work.
I can reproduce it in a very simple solution which only has this middleware simulating the culture 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 it gets execute but when I'm calling an action the controller doesn't have the culture (like it had in .net 4.5.1)
I already posted here but the support is really slow. One Answer every two weeks and then it seems like they haven't tried what they write :-(
https://connect.microsoft.com/VisualStudio/feedback/details/2455357