This project is read-only.
2

Closed

Getting Culture related error

description

Hello Support,
 
I have downloaded the ProDinner code from the following URL:
 
http://prodinner.codeplex.com/
 
And unzipped the code and followed the instructions as you have mentioned in the readme text file and restored the database successfully from sql script successfully. When I tried to run the application I am getting the error.Please find the error snapshot. Please let me know ,how can I 'll resolve this issue.
 
Thanks,
Sushma Sharma.

file attachments

Closed Nov 14, 2012 at 9:26 AM by o
version 8 doesn't has this issue

comments

o wrote Jul 31, 2012 at 11:47 PM

have you managed to handle this ?

o wrote Aug 25, 2012 at 2:58 PM

this is an issue on some machines, fixed it by adding this to web.config:

<globalization culture="auto" uiCulture="auto"/>

and in Global.asax.cs added on line so now Application_BeginRequest looks like this:
protected void Application_BeginRequest(object sender, EventArgs e)
    {
        var c = Request.Cookies["lang"];
        if (c == null || c.Value == "auto") return;

        var l = c.Value;

        // Uses WebForms code to apply "auto" culture to current thread and deal with
        // invalid culture requests automatically. Defaults to en-US when not specified.
        using (var fakePage = new Page())
        {
            var ignored = fakePage.Server; // Work around a WebForms quirk
            fakePage.Culture = l; // Apply local formatting to this thread
            fakePage.UICulture = l; // Apply local language to this thread
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(l);
            HttpContext.Current.Items.Add("lang", l);
        }
    }

wrote Aug 25, 2012 at 2:59 PM

wrote Nov 14, 2012 at 9:26 AM

wrote Feb 22, 2013 at 12:49 AM

wrote May 16, 2013 at 12:53 PM