Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS regional setting?

Status
Not open for further replies.

PapaSmurf

IS-IT--Management
May 16, 2001
48
GB
I have an ASP.NET app on a test server. On a page I have a datagrid with a column of values formatted to {0:c}. The figures in this column look like £xx.xx as expected (pound sign as I'm in the UK).

However when I run the same pages on my Live server the values are formatted with a $ sign instead. Both are Win2k IIS 5, and both regional settings are the same.

How do I change my Live server so that it will return the correct currency?
 
you could use the LCID (2057 for UK) in your pages.

check forum855 (asp.net) for exact useage.

Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Thanks Chris,

As a last resort there are several things I could do in the code to fix it, including using LCID stuff.

I'd rather not though - it works fine on one server and therefore should on the other, therefore something is different which i must be able to change?!

Anyone?
 
I've fixed the problem.

It was the regional settings for the ASP.NET user account. Changing it is fun though, I had to find the SSID for the ASPNET user in the registry and change the regional settings there.

After a restart all is fine and I'm getting £s without changing any code!

If anyone has the same problem reply here and I shall send more details.
 
i am having a similar problem but mine is with old ASP. i have a date Field on the database when i try to write information to it it gets changed to American format even thought the sql string is formatted correctly as dd/mm/yyyy. is there a setting in need to change. I've changed the regional setting on the server to match the ones on the local test server but still the same result

 
Right, it's the regional settings for the aspnet user that you need to change. You can't log in as that user of course though...

so run regedit... then go to HKEY_USERS\CSID (trial and error to find it) \CONTROL PANEL\INTERNATIONAL then export the whole lot as a 98 format reg file. The aspnet user one will have US settings. Next find the CSID that has UK settings and export that in the same way.

Now get the reg file exported from the administrator account (one with UK settings) and replace the CSID with the one exported from the aspnet user (US settings). import your ammended file, restart and bob should be your uncle.

good luck. There is a util on the net somewhere that will identify the CSID for a user which may help if you have lots of local users on that pc!
 
just to confirm something with you. this is not a ASP.net application just old ASP. but i guessed the problem could be the same as you were having. i an correct in thinking this or is this solution only for asp.net applications

Simon
 
should be same theory to fix it - have a look through the international settings and see if there's anything US in there - change them to UK and see if it fixes it!
 
Just to close the post. I finally got it sorted after almost losing my mind. It was a registry problem after all. The problem was that even though the regional settings on the PC looked ok, in the registry there was a entry in the HKEY_USERS\.DEFAULT\Control Panel\International, all the setting in here were in American format. So I exported the international folder on my local p.c. and imported it into the web server and restarted the server and hey presto problem solved thank god. Thanks for the pointer PapaSmurf I would never have looked in the registry if you had not of pointed me in that direction

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top