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 / General / September 2007

Tip: Looking for answers? Try searching our database.

When new instance of webservice?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hvj@paralax.nl - 11 Sep 2007 07:31 GMT
Does IIS create a separate instance of a webservice for each call to
it or if more calls are done at the same time, is it possible that the
same instance will be used for more calls?

So do I have to consider thread savety when storing intermediate
results in local variables of a webservice?

And what about static variables of the webservice?
Harshal Pachpande - 11 Sep 2007 09:11 GMT
I believe, IIS creates one instance per call, just like aspx page instance,
so you can safely use the local/class-level variables.

As long as static variables are concerned again just like aspx, is common to
all users and has application scope.

- Harshal

> Does IIS create a separate instance of a webservice for each call to
> it or if more calls are done at the same time, is it possible that the
[quoted text clipped - 4 lines]
>
> And what about static variables of the webservice?
Alex Meleta - 11 Sep 2007 09:17 GMT
Hi,

> Does IIS create a separate instance of a webservice for each call
Every time a web service is invoked a new instance of the *web service* is
created (not an application).

> is it possible that the same instance will be used for more calls
For what? Only for keeping state?

> I have to consider thread savety when storing intermediate
> results in local variables of a webservice?
The application instance is keeping between invoking. So, static variables
and application state is keeping also.

See there for more info (and concept links out there).
[ASP.NET Application Life Cycle Overview ]
http://msdn2.microsoft.com/ru-ru/library/ms178473.aspx

Regards, Alex
[TechBlog] http://devkids.blogspot.com

> Does IIS create a separate instance of a webservice for each call to
> it or if more calls are done at the same time, is it possible that the
[quoted text clipped - 4 lines]
>
> And what about static variables of the webservice?

Rate this thread:







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.