Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Server.Transfer with language support enabled (solution)

Vote:
 
Ran into some problems today with using Server.Transfer with languagesupport enabled. Normally when a site consist of two branches intended for different domain names I do a server.transfer (to avoid a 302-redirect with Response.Redirect) at default.aspx to point the request to the right place (depending on domain name). Problem occured with languagesupport enabled. When transfering from default.aspx to any page (/templates/Page.aspx?id=69, default.aspx?id=3 etc) I ended up at default.aspx again, an infinite transfer loop :(. When doing a transfer with languagesupport enabled to /templates/default.aspx?id=66 episerver wants to mess with the querystrings (add "epslanguage" etc) and for some reason the transfer resulted in a request for default.aspx again! Solution is to add the language query yourself, ex: Server.Transfer("/templates/Page.aspx?id=66&epslanguage=" + LanguageContext.Current.CurrentLanguageBranch, true); That works. Maybe this will help someone running into the same problem and hope to find the answer on this formum (like I did). // Björn Sållarp Avantime AB
#12898
Jan 15, 2007 14:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.