Solved

Globalization not workin in production

Posted on 2013-01-07
3
289 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now