473,322 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

CultureInfo changed on Callback threads?

Basic scenario
-Winforms client calling an asp.net web service on Windows X

Problem: When I perform an async web service call from a winform client, my Thread.CurrentCulture and Thread.CurrentUICulture are changed from the initiating thread's culture

Some code

Set all the Cultures to a different culture

static void Main()

Thread.CurrentThread.CurrentCulture = new CultureInfo("fi-FI")
Thread.CurrentThread.CurrentUICulture = new CultureInfo("fi-FI")
Application.CurrentCulture = new CultureInfo("fi-FI")
Application.Run(new SomeForm())
Make an Async webservice call

IAsyncResult ar = myWebService.BeginSomeWebServiceMethod(new AsyncCallback(MyCallback), "hi")

Recieve the callback

private void GetDatabaseInfoCallback(IAsyncResult ar)

string retval = myWebService.EndSomeWebServiceMethod(ar)
//Thread.CurrentThread.CurrentCulture.Name is now "en-US
Is this correct? How can I get my callback threads to be in the same culture as the Application thread

Thanks

Chad Brockma
ch****@yahoo.co

Nov 12 '05 #1
0 1289

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: scott ocamb | last post by:
hello I have implemented a solution using async methods. There is one async method that can be invoked multiple times, ie there are multiple async "threads" running at a time. When these...
1
by: johnny | last post by:
In a multi-threaded application, say a worker thread makes an asynchronous call and specifies a callback method. But before the callback is executed, the thread is aborted by its creator. What is...
1
by: Dennis Burns | last post by:
I've posted this question before, and since then I've tried a variety of work-arounds, with no success. So, here goes again... I'd like to create forms and open them from within a callback...
1
by: rerdavies | last post by:
OS: WIndows Server 2003. Currently logged in user is running with German(German) regional settings. Code fragment: System.Globalization.CultureInfo culture = new...
0
by: MalamisuraE | last post by:
I need to write a class that will process a qued list of items, each item could take a long or short time based on the items. I want to use Asynchronous Callback Methods to do this instead of...
5
by: greg.merideth | last post by:
I have a class that I've provided an event for to be called when the processing in the class is complete (a callback). The class spins up a series of threads for the background operation and I'm...
7
by: Kirk McDonald | last post by:
Let's say I have a function that takes a callback function as a parameter, and uses it to describe an iteration: def func(callback): for i in : callback(i) For the sake of argument, assume...
3
by: schaf | last post by:
Hi NG! My situation: I call a function on a related system and this function call results in a fired event, handled in my app. I recognized that the handle method runs in his own thread and this...
4
by: Edwin Gomez | last post by:
I'm a C# developer and I'm new to Python. I would like to know if the concept of Asynchronous call-backs exists in Python. Basically what I mean is that I dispatch a thread and when the thread...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.