When new instance of webservice?

H

hvj

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?
 
H

Harshal Pachpande

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
 
A

Alex Meleta

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top