Solved

Globalization not workin in production

Posted on 2013-01-07
3
296 Views
Last Modified: 2013-01-16
We currently have globlization set up and are able to switch between multiple languages on our development box.  However when we push the code to production it stays defaulted to en-US.  I have verified all entries in the web-config  are the same and database entries for setting the session variables are the same.  

When I output my session variable to the page is it correct for the change language.  But the
CurrentUICulture stay en-US  

Are there any server permissions or other factors that would affect this?  

Any help is appreciated.

<httpModules>
      <add name="CookieLocalizationModule" type="PDR.CookieLocalizationModule, PDR" />
</httpModules>
<identity impersonate="true" />  
 <globalization uiCulture="auto" culture="auto" />



public void PreRequestHandlerExecute(object sender, EventArgs e)
        {
            string lang = null;
            PDR.Models.Currency currency = null;
            string currencyCulture = null;
            try
            {
                lang = HttpContext.Current.Session["Language"].ToString();
                currency = (PDR.Models.Currency)(HttpContext.Current.Session["Currency"]);
                currencyCulture = currency.CurrencyCulture;
                var culture = new System.Globalization.CultureInfo(lang);
                var cculture = new System.Globalization.CultureInfo(currencyCulture);
                Thread.CurrentThread.CurrentCulture = cculture;
                Thread.CurrentThread.12= culture;
            }
            catch
            { }
           
        }
0
Comment
Question by:Josh_Blade
  • 2
3 Comments
 
LVL 8

Expert Comment

by:deepu chandran
ID: 38753793
HI,

Two major Possiblities for this,
1) Check your resource DLL's are properly Created
2) The resource name and the language variable string should match
lang = HttpContext.Current.Session["Language"].ToString();
This should be "en-US" ,"de-DE" etc

Regards
Deepu
0
 

Accepted Solution

by:
Josh_Blade earned 0 total points
ID: 38766606
At the end of the day my issue ended up being an application pool setting in IIS.  

It was not loading the Http Module when set to integrated security. It has to be set to classic.

http://luckyabhishek.blogspot.com/2009/06/http-module-not-loading-in-iis.html

Thanks for the help.
0
 

Author Closing Comment

by:Josh_Blade
ID: 38781917
Hope this helps someone else.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question