winform Apps for SharePoint works on the dev but getting errors in staging

228 views Asked by At

I get this after few minutes.

visual studio just-in-time debugger an unhandled win32 exception occured in winprogram.exe[6108]

Then I see this in the event logger. Time Provider NtpClient: No valid response has been received from domain controller dc.columbiauniv.gov after 8 attempts to contact it. This domain controller will be discarded as a time source and NtpClient will attempt to discover a new domain controller from which to synchronize.

For more information, see Help and Support Center at

2

There are 2 answers

2
Mina Kumari On

It seems that this code works on both Dev and Staging. String strDT = DateTime.Now.ToString("yyyyMMddHHmmss");

I was using this code before and it only worked on Dev. String strDT = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString();

2
CodeThug On

I'm not quite sure what this has to do with Sharepoint, but regardless...

I doubt the NTP errors are related - those errors are just telling you that your computer can't see the domain controller, which is likely caused because you aren't on the same subnet as your domain controller

To track down the crash: - Try to run the application on another computer that has visual studio installed. If the error comes up, debug it there - Add in tracing. You could even have your application write trace logs to the console so that you find out exactly where in your code the application is dying.

When you find the error, either fix the bug or add in a try/catch block to catch and handle the exception appropriately