ASP.NET regional settings

G

Guest

Hello everybody,

I have a question about the ASP.NET registry account. I'm writing a web
application that requires the server's ASP.NET user account to have its
decimal separator symbol set to a period. (because a 3rd party component
requires so) I have also created a small executable that is able to set those
regional settings as required. The downside is that the windows accounts are
all encrypted in the registry, so I do not know which one is the ASP.NET
account. Hence, *ALL* accounts are currently set with the required regional
settings. Is there any way to separate the ASP.NET account from the rest so
they can be left as they are?

P.S. I don't think the following information is of any importance in this
case, but the program is running on a Win XP machine with ASP.NET 2.0

Any help would be much appreciated!

With kind regards,

Stefan A.

programmer
 
G

Guest

Stefan_KIC said:
Hello everybody,

I have a question about the ASP.NET registry account. I'm writing a web
application that requires the server's ASP.NET user account to have its
decimal separator symbol set to a period. (because a 3rd party component
requires so) I have also created a small executable that is able to set
those

What is the purpose of it? Do you need to pass a number in certain format to
your component, or format its values?

There is System.Globalization.NumberFormatInfo that may you help
 
G

Guest

First of all, thanks for helping!

The purpose:
Basically, I have a project that converts a C# class to graphical
coordinates for a plugin. This plugin expects the coordinates to be written
using a period as decimal separator. Naturally, this works fine if the server
is a U.S or U.K server, but if it is not, the graphics will be drawn
incorrectly.

Your second question:
I need to pass the doubles in a certain format to the plugin (period
separated).

The System.Globalization namespace could indeed be the solution to my
problem. If I do a .ToString() on a double it uses the ASP.NET registry
account's settings, but if I can somehow tell the compiler to use
InvariantCulture it may be solved. I will certainly look this up and try it
out!

Thank you very much!
Stefan
 

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

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top