Solved

Globalization not workin in production

Posted on 2013-01-07
3
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

Suggested Solutions

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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