Hi there,
I hope someone can help with solution to this problem?
Currently my ASP.Net MVC website uses forms authentication is set up like this my web.config:
<authentication mode="Forms">
<forms loginUrl="en/User/Signin" timeout="2880" />
</authentication>
We have some routing rules that use the prefix /en/ in the url as a identifier for the language, but the problem is that if someone is visiting our french site www.web.com/fr/Secure/privateData, they are redirect to www.web.com/en/User/Signin, which in turn sets the culture to english. So after logging in, users may need to change there language back to french.
Not good!
So if the website need to suppurt more languages, so I need to do something like this in the web config:
<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>
I know you can not have code in the web.config, but this is just to illustrate what I am trying to achieve. Could anyone provide a simple solution, or links to solutions they may already use?
Thanks alot!