Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2005

Tip: Looking for answers? Try searching our database.

webservice restarts?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arpicheck - 09 Mar 2005 11:01 GMT
Hi,

I wrote a webservice, that creates a timer thred. This thread is used to
execute common tasks from time to time. The timer starts after the first call
of web service. Everithing works fine, but after a while (>10mins) the thread
stops. It seems, that the webservice is in "uninitalized" state. If i call it
again, the thred work fine again, unitl a while.

Should i set something for the webservice? Is there a mechanism shuting down
services from time-to-time?

Thanks in advance,
Arpicheck
Keenan Newton - 09 Mar 2005 16:37 GMT
Is this being hosted on Windows 200 server or Windows 2003?
Arpicheck - 16 Mar 2005 09:01 GMT
This is Windows 2000. :-)

> Is this being hosted on Windows 200 server or Windows 2003?
Arpicheck - 16 Mar 2005 09:21 GMT
Nope, sorry, Windows 2003.

> This is Windows 2000. :-)
>
> > Is this being hosted on Windows 200 server or Windows 2003?
Raj Tripathi - 09 Mar 2005 17:47 GMT
Don't use Timers in Web Services!!!
Use Windows Services for this task.

Think it this way when you call method of webservice an instance of
WebService class is created. Method is called. WebService class is destroyed.

( In your case it is destroyed (GC collected) after 10 min.)

> Hi,
>
[quoted text clipped - 9 lines]
> Thanks in advance,
> Arpicheck
Arpicheck - 16 Mar 2005 09:01 GMT
I don't know, if this is true. After every tick of my timer is generate one
node into an XML object as a log. I got a webmethod returning this XML
containing the log. After each tick the log extends, so no new instances. I
got some other global objects, for example an excel application. Keeps
running.

But after a while (this is more then 15 minutes) all the objects will be
reseted.
Why?

> Don't use Timers in Web Services!!!
> Use Windows Services for this task.
[quoted text clipped - 17 lines]
> > Thanks in advance,
> > Arpicheck
Raj Tripathi - 17 Mar 2005 07:11 GMT
I'm still pretty shure that YOU SHOULD NOT use Timers in WebService.

Check out this MSDN article for reference:
http://msdn.microsoft.com/msdnmag/issues/05/03/SchedulingASPNETCode/

Raj

> I don't know, if this is true. After every tick of my timer is generate one
> node into an XML object as a log. I got a webmethod returning this XML
[quoted text clipped - 27 lines]
> > > Thanks in advance,
> > > Arpicheck

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.