Can I change the locale on a Windows Azure website?

We have a number of classic ASP applications that we are looking for for the port for the new Windows Azure website.

Classic ASP sites are written on a server that runs in the British language. Classic ASP has been encoded to use British datetime formats in various ways on hundreds of pages. When I tried the code on servers with a locale in the USA before, datetime processing fails because the date and time format is different.

Does anyone know if I can specify the locale for the website?

Also, does anyone know how to change the locale to a standard web role using the launch task?

+6
source share
1 answer

If you want to customize the website globalization, the globalization element is best.

To change the language standard of your site, you can set crop and crop production correctly in web.config.

On Windows Azure, if you want to do this in the startup task, you will need to create a batch file ( ie global.cmd ) in which the following command can be executed:

Appcmd set config /commit:WEBROOT /section:globalization /culture: string Appcmd set config /commit:WEBROOT /section:globalization /uiCulture: string 

Change the "string" to the desired locale code.

Finally, you can create a launch task defined in ServiceDefinition.csdef

 <Startup> <Task commandLine="global.cmd" executionContext="elevated" taskType="simple" /> </Startup> 
+4
source

Source: https://habr.com/ru/post/918135/


All Articles