Click here to Skip to main content
15,888,301 members
Home / Discussions / C#
   

C#

 
QuestionEvent Trigger Pin
eyalle30-Sep-09 4:00
eyalle30-Sep-09 4:00 
AnswerRe: Event Trigger Pin
Md. Marufuzzaman30-Sep-09 5:46
professionalMd. Marufuzzaman30-Sep-09 5:46 
QuestionRegistry problem with 64-bit Vista Pin
Sifar - 030-Sep-09 3:53
Sifar - 030-Sep-09 3:53 
AnswerRe: Registry problem with 64-bit Vista Pin
monstale30-Sep-09 4:16
monstale30-Sep-09 4:16 
Questionhow to use Update command from tableadapter Pin
kalevikas30-Sep-09 3:49
kalevikas30-Sep-09 3:49 
AnswerRe: how to use Update command from tableadapter Pin
Henry Minute30-Sep-09 6:02
Henry Minute30-Sep-09 6:02 
QuestionHow can i let the user insert a new values into a combobox inside of datagridview Pin
bonzaiholding30-Sep-09 3:27
bonzaiholding30-Sep-09 3:27 
QuestionWhy Don't Change Server Time? (Please Help, It is very urgent) Pin
Hamid Khezeli30-Sep-09 3:02
Hamid Khezeli30-Sep-09 3:02 
I wrote a Web application by ASP.NET and C#. I need to change date of my server behind about 1 year ago and after that changing date came back. For example, time is 30/09/2009 and when the program runs, time should be 30/09/2008 and after 3sec time comes back 30/09/2009.
I wrote this rule by ASP.NET and C# and that web application work correctly, but for 5 days, that code can't change date of server, although web application worked correctly and could change date by below codes.
Also these codes work and can change date of server when those are written as WIN application and don't return any error, and those are written as WEB application and run in Visual Studio 2008 don't return any error and works correctly, but when those codes are written as WEB application and run in ISS can't change date of server and return "error: 1314", so I be confused!!!
I will be very glad if somebody helps me.
Thank you very much.


<pre>   [DllImport("kernel32.dll", SetLastError = true)]
         public static extern int SetLocalTime(ref SystemTime lpSystemTime);
        
         [DllImport("kernel32.dll", SetLastError = true)]
         private static extern uint GetLastError();

         public struct SystemTime
         {
                  public short wYear;
                  public short wMonth;
                  public short wDayOfWeek;
                  public short wDay;
                  public short wHour;
                  public short wMinute;
                  public short wSecond;
                  public short wMilliseconds;
         }

         private void ChangeDate()
         {
                           SystemTime systNew = new SystemTime();
                           systNew.wDay = (short)dateTime.Day;
                           systNew.wMonth = (short)dateTime.Month;
                           systNew.wYear = (short)2008;
                           systNew.wHour = (short)dateTime.Hour;
                           systNew.wMinute = (short)dateTime.Minute;
                           systNew.wSecond = (short)dateTime.Second;
                           SetLocalTime(ref systNew);
                           uint lastErrCode = GetLastError();

         }</pre>
AnswerRe: Why Don't Change Server Time? (Please Help, It is very urgent) Pin
Luc Pattyn30-Sep-09 3:19
sitebuilderLuc Pattyn30-Sep-09 3:19 
GeneralRe: Why Don't Change Server Time? (Please Help, It is very urgent) Pin
Hamid Khezeli30-Sep-09 3:54
Hamid Khezeli30-Sep-09 3:54 
GeneralRe: Why Don't Change Server Time? (Please Help, It is very urgent) Pin
Luc Pattyn30-Sep-09 4:00
sitebuilderLuc Pattyn30-Sep-09 4:00 
AnswerRe: Why Don't Change Server Time? (Please Help, It is very urgent) Pin
J4amieC30-Sep-09 3:59
J4amieC30-Sep-09 3:59 
GeneralRe: Why Don't Change Server Time? (Please Help, It is very urgent) Pin
Hamid Khezeli30-Sep-09 4:11
Hamid Khezeli30-Sep-09 4:11 
GeneralRe: Why Don't Change Server Time? (Please Help, It is very urgent) Pin
J4amieC30-Sep-09 4:43
J4amieC30-Sep-09 4:43 
GeneralRe: Why Don't Change Server Time? (Please Help, It is very urgent) Pin
Hamid Khezeli30-Sep-09 12:30
Hamid Khezeli30-Sep-09 12:30 
AnswerCP IGNORE: Cross Post (3 forums) Pin
leckey30-Sep-09 6:24
leckey30-Sep-09 6:24 
Questionretrieve data from tableadapter in for selected value in combobox Pin
kalevikas30-Sep-09 2:48
kalevikas30-Sep-09 2:48 
AnswerRe: retrieve data from tableadapter in for selected value in combobox Pin
Henry Minute30-Sep-09 2:56
Henry Minute30-Sep-09 2:56 
AnswerRe: retrieve data from tableadapter in for selected value in combobox Pin
Mycroft Holmes30-Sep-09 13:24
professionalMycroft Holmes30-Sep-09 13:24 
Questionnumbers in words in crystal report Pin
Enobong Adahada30-Sep-09 2:45
Enobong Adahada30-Sep-09 2:45 
Questionlandscape page in crystal report Pin
Enobong Adahada30-Sep-09 2:40
Enobong Adahada30-Sep-09 2:40 
QuestionHow to read a message of class IPM.Note.SMIME.MultipartSigned in c# using CDO Pin
Nitesh Malik30-Sep-09 2:39
Nitesh Malik30-Sep-09 2:39 
QuestionHow to translate Win32 error codes Pin
Jörgen Sigvardsson30-Sep-09 2:00
Jörgen Sigvardsson30-Sep-09 2:00 
AnswerRe: How to translate Win32 error codes Pin
stancrm30-Sep-09 2:04
stancrm30-Sep-09 2:04 
GeneralRe: How to translate Win32 error codes Pin
Jörgen Sigvardsson30-Sep-09 2:08
Jörgen Sigvardsson30-Sep-09 2:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.