I have a windows service which runs based on the machine name or ip assigned to it. I am facing problems running it when i have a failover server and alias names described below.
There is a main server in one subnet with machine name like server_a and a failover server in another subnet with name server_b
Both the systems are created with Alias name server and this name is configured in the service configuration for my softwares service.
Both the systems are configured with different IP address and there is no DNS server configured in the n/w.
My services will connect to main service if the server configuration is configured with actual machine name (server_a/server_b) or with IP but will not connect if Alias name (server) is configured.
Services always show error code as “Unable to read Configuration ! : Code 1” if started in debug mode,if not able to connect.
We use the gethostbyname function to resolve the name.
Can anybody let me know anyway by which i can make the service work without changing the name everytime.