Hi!
I have requirement to change system date and time from MVC application. below code work find when i open Visual studio as Administrator, but when deploy it on IIS it is not working. can any one help to how can i achieve this.
[StructLayout(LayoutKind.Sequential)]
public struct SYSTEMTIME
{
public ushort Year;
public ushort Month;
public ushort DayOfWeek;
public ushort Day;
public ushort Hour;
public ushort Minute;
public ushort Second;
public ushort Milliseconds;
}
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool SetSystemTime(ref SYSTEMTIME st);
Go to the complete details ...