This is a difficult question, we have an ASP. Net application, IIS 7 server (classic pipeline running, if it is relevant) and a fat ugly com object library.
This library is used in such a way: Call the function, get results, show it. The problem is: There is no function to change the language preference in the COM library - it starts with the "web .config" file and then there is no clear way to change it.
The problem is how to do this - the legal way I can do anything with the ASP.NET app and something on the server.
Actually, I think, I have to call SetThreadCultureUI () for any application pool thread. Also, of course, there is a chance that I can make some application domains for each language, and I can load them in COM, but it will be a lot of coding.
Su ... Any idea to do this is the fastest and easiest way? (Many app copies of an app copy are already used solutions, but one is bad)
You will need to do some tests if the COM application is actually reading language settings from web.config (and it will obviously be unusual that this is done) then you can not do this rewrite the web.config Hard to do, at least not because you have to save the file to the application pool The Nrarnb!
If it is checking the OS for a certain thread, then you can use a code in your code to close a new thread in a backgroundworker
Alternatively, you can set up the culture, and call your COM object (with the appropriate lock
to ensure the third-security). Many Ape pools have a heavy weight but slightest answer to the problem. I think this is the only solution if the COM library web. Config reading.
No comments:
Post a Comment