byang
August 9th, 2005, 04:02 AM
hi i am currently developing a C# windows service that utilizes sharepointlistservice.GetList method...
my problem is that when it reaches in the line where sharepointlistservice.GetList("listname") is located the service will hang there and will again execute the other lines of code before this line. btw, im using a timer which will perform this method every 30 seconds.
here is a code snippet of my code:
private void timer_Elapsed(object sender, ElapsedEventArgs e)
{
EventLog.WriteEntry("before record checking - service running");
db.CheckNewRecords();
SharepointLists.Lists listService = new WindowsServiceTest.SharepointLists.Lists();
listService.Credentials= System.Net.CredentialCache.DefaultCredentials;
EventLog.WriteEntry(listService.GetList("Contacts").OuterXml);
EventLog.WriteEntry("after record checking - service running");
}
it is in this line that my service hang:
EventLog.WriteEntry(listService.GetList("Contacts").OuterXml);
the lines before the above line is being executed by my service.
please help me! thank you so much!
my problem is that when it reaches in the line where sharepointlistservice.GetList("listname") is located the service will hang there and will again execute the other lines of code before this line. btw, im using a timer which will perform this method every 30 seconds.
here is a code snippet of my code:
private void timer_Elapsed(object sender, ElapsedEventArgs e)
{
EventLog.WriteEntry("before record checking - service running");
db.CheckNewRecords();
SharepointLists.Lists listService = new WindowsServiceTest.SharepointLists.Lists();
listService.Credentials= System.Net.CredentialCache.DefaultCredentials;
EventLog.WriteEntry(listService.GetList("Contacts").OuterXml);
EventLog.WriteEntry("after record checking - service running");
}
it is in this line that my service hang:
EventLog.WriteEntry(listService.GetList("Contacts").OuterXml);
the lines before the above line is being executed by my service.
please help me! thank you so much!