Wednesday, 15 February 2012

registration - Register custom culture in Windows Azure -



registration - Register custom culture in Windows Azure -

i developing asp.net mvc 4 app african market , hoping register custom civilization using steps detailed in next link http://msdn.microsoft.com/en-gb/library/system.globalization.cultureandregioninfobuilder.register(v=vs.110).aspx. of target countries not in pre-installed cultures sounds need register these cultures. problem is, console app doing registration need admin previlidges finish civilization registration. presuming windows azure not allow developers admin command of cloud service environment.

question: best way register custom civilization in windows azure without admin previlidges. apparently there's way on framework 2.0 using cultureandregioninfobuilder.compile method not supported method. there improve solution? don't want have maintain different project solutions each civilization can back upwards different languages.

thanks in advance.

you create startup task runs elevated priviledges, , run application on limited context. service configuration file should this:

<servicedefinition name="mycloudservice" xmlns="http://schemas.microsoft.com/servicehosting/2008/10/servicedefinition" schemaversion="2012-10.1.8"> <webrole name="mywebrole" vmsize="small"> <runtime executioncontext="limited"> </runtime> <startup> <task executioncontext="elevated" commandline="scripts\setupculture.cmd" tasktype="simple"> <environment> <variable name="culture"> <roleinstancevalue xpath="/roleenvironment/currentinstance/configurationsettings/configurationsetting[@name='culture']/@value" /> </variable> </environment> </task> </startup> ... </webrole> </servicedefinition>

note can specify desired civilization in service configuration file. can utilize environment variable "culture" in .cmd file utilize parameter .net executable doing job.

azure registration culture

No comments:

Post a Comment