I hope someone can help with solving this problem?
Currently my ASP.Net MVC website uses form authentication, as my web.config does:
<authentication mode="Forms">
<forms loginUrl="en/User/Signin" timeout="2880" />
</authentication>
We have some routing rules that use the / en / prefix in the url as an identifier for the language, but the problem is that if someone visits our French site www.web.com/fr/Secure/privateData, they are redirected to the site www.web.com/en/User/Signin, which in turn sets the culture for English. Therefore, after logging in, users may need to change the language to French.
Not good!
So, if the website needs to redirect more languages, so I need to do something like this in the web configuration:
<authentication mode="Forms">
<%if (isGerman()) { %>
<forms loginUrl="de/User/Signin" timeout="2880" />
<%} else if (isFrench()) {%>
<forms loginUrl="fr/User/Signin" timeout="2880" />
<%} else { %>
<forms loginUrl="en/User/Signin" timeout="2880" />
<% } %>
</authentication>
, web.config, , . - , ?
, !