Solved

Globalization not workin in production

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

914 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