简体   繁体   English

ASP.NET MVC LCID和会话

[英]ASP.NET MVC LCID and Sessions

i have to short questions on ASP MVC. 我不得不在ASP MVC上简短提问。 Where is the best place for setting on Session.LCID ? Session.LCID设置的最佳位置在哪里?

Thanks 谢谢

In three places: 在三个地方:

Upon login, inside the controller once successfully authenticated. 登录后,控制器内部一旦成功通过身份验证。

When they change their culture setting explicitly. 当他们明确改变自己的文化背景时。

Before they are logged in you would base it on browser or ip address and set in a base controller , reading from the session first to check if it's been set above. 在登录之前,您需要基于浏览器或IP地址并在基本控制器中进行设置,首先从会话中读取内容以检查是否已在上面进行设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM