Network Service date format problem - British vs US

J

JimLad

Hi,

We've reinstalled our 2003 server using British date format dd/MM/
yyyy.

We are using Network Service account in our app pool. I wrote a test
program to check the date format and it is using US date format MM/dd/
yyyy. If I switch the app pool to the local system account then
British dates are used correctly.

My support team say the Network Service account date format can't be
changed. Please tell me they are wrong?

BTW - this is to support a legacy program that passes mutable date
strings around. I would of course not do this for a new program.

Cheers,

James
 
K

Kornél Pál

Of course they are wrong.:)

You can change it using API calls as well but the easiest thing is to
copy the settings from HKEY_USERS\.DEFAULT\Control Panel\International
to HKEY_USERS\S-1-5-20\Control Panel\International.

Also note that if your are using .NET Framework then you can configure
your app to use British locale using <globalization culture="en-GB" />

See http://msdn.microsoft.com/en-us/library/hy4kkhe0.aspx

Kornél
 
J

Jesse Houwing

Hello JimLad,
Hi,

We've reinstalled our 2003 server using British date format dd/MM/
yyyy.

We are using Network Service account in our app pool. I wrote a test
program to check the date format and it is using US date format MM/dd/
yyyy. If I switch the app pool to the local system account then
British dates are used correctly.

My support team say the Network Service account date format can't be
changed. Please tell me they are wrong?

BTW - this is to support a legacy program that passes mutable date
strings around. I would of course not do this for a new program.

Instead of trusting the account to have the correct settings (it get's even
worse if multiple websites on your server use the same App Pool), you can
specify the settings in your web.config. These will be application specific
and will override the account settings.

See http://msdn.microsoft.com/en-us/library/hy4kkhe0.aspx for more information...
 
J

JimLad

Of course they are wrong.:)

You can change it using API calls as well but the easiest thing is to
copy the settings from HKEY_USERS\.DEFAULT\Control Panel\International
to HKEY_USERS\S-1-5-20\Control Panel\International.

Also note that if your are using .NET Framework then you can configure
your app to use British locale using <globalization culture="en-GB" />

Seehttp://msdn.microsoft.com/en-us/library/hy4kkhe0.aspx

Kornél








- Show quoted text -

Many thanks Kornél. That has confirmed my thoughts.

Should I change S-1-5-19 LocalService as well?

This is for a server move so I will use the registry hack/change you
suggest.

This confirms what I read at the following post:
http://www.techtalkz.com/windows-server-2003/39724-change-profile-used-network-service.html

I'll just write 'regional settings' here so other people can find this
post. :)

Cheers,

James
 
J

JimLad

Hello JimLad,






Instead of trusting the account to have the correct settings (it get's even
worse if multiple websites on your server use the same App Pool), you can
specify the settings in your web.config. These will be application specific
and will override the account settings.

Seehttp://msdn.microsoft.com/en-us/library/hy4kkhe0.aspxfor more information...

Hi Jesse,

Thanks. I will use this in future. However to support the legacy apps
it's simplest to change the default as well.

Many thanks,

James
 
J

JimLad

Hi Jesse,

Thanks. I will use this in future. However to support the legacy apps
it's simplest to change the default as well.

Many thanks,

James- Hide quoted text -

- Show quoted text -

http://support.microsoft.com/kb/243330/en-us

This shows the various security identifiers. The most relevant are:

SID: S-1-5-18
Name: Local System
Description: A service account that is used by the operating system.

SID: S-1-5-19
Name: NT Authority
Description: Local Service

SID: S-1-5-20
Name: NT Authority
Description: Network Service
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top