Click here to Skip to main content
14,333,745 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am working on an application using c# and sql server, my application should be run in a LAN, I need application in clients take the date/datetime from the server even if client users change their system date/datetime.So, is their a way to do so.

What I have tried:

I have tried to use ManagementScope,whether it works for me or not, Is it what I am looking for.
Posted
Updated 8-Oct-19 13:38pm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You do not need to develop an application for that. There already exists a network protocol - a very important one, security-wise - which is called ntp (Network Time Protocol). And this should definitively not being managed from a client application.
If you are in a LAN, you should have an authoritative source of time, which is normally managed by your network administrator. Active Directory domain handle that (almost) automatically, and your regulars users should not be allowed to change the time on their work pc's, anyway.

I suggest that you think very toroughly about what you want to accomplish.
   
Comments
mahboob_alhabeeb 8-Oct-19 20:05pm
   
Thanks for help, the application should be run on workgroup
phil.o 8-Oct-19 20:20pm
   
Here[^] you can find how to configure the ntp client on each computer.
But then you need a ntp server; either you use an external time source (like one of ntp.org pool[^] or Public Time Servers List[^]), or install one on your lan (NTP ports - Microsoft Windows[^]).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100