I have a system where its authentication holds a token in a ThreadStatic property. It turns out that Monday, he started distributing the tokens incorrectly (after updating the windows server).
I made the application below to test the scenario
public class HomeController : Controller {
[ThreadStatic]
public static String texto;
public String teste(String valor) {
if(valor != null && !valor.equals("")) {
texto = valor;
}
return texto;
}
}
Scenery
If I call the URL http://localhost/home/teste?valor=oi
I get the result hi. If I call the same method http://localhost/home/teste
without passing the attribute value time it returns me empty, time it returns me filled and if I call again passing as value tchau
it will get me returning this value in a random way. Is this behavior normal with ThreadStatic
or might it have modified something in the .NET update?
Thank you.