I am trying to find a way to find which environment(dev, test, cert or prod) the windows service is running to set the connection string accordingly without supplying the server names.
I think i might be able to use Environment variables but i don't know for sure.
Does anyone have any information, any help is appreciated.
to find which environment(dev, test, cert or prod)
On which indicator do you want to get this information; there are no default settings in any way how you can get this information?
Here you have to find your own solution, may on the machine name or an own knowledge base or something else.
Thanks Olaf Helper for your response. But i am wondering that when i use the below in my dev environment
string MachineName = Environment.CurrentDirectory;