Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Globalization not workin in production

Posted on 2013-01-07
3
Medium Priority
?
301 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2
Suggested Courses

916 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