noob assumptions about webservices in ASP.NET

E

evil tabby cat

I have the following assumptions about .NET webservices which I need
confirmation/denial of:

1 - They are only instantiated when required & then a different
instance for each request.

2 - If someone making a request causes an unhandled exception then
their instance will die but it won't effect anyone else making
requests.

If someone knows either of those are wrong or a good source
information regarding those assumptions I'd really appreciate it.
 
S

Scott M.

1 - They are only instantiated when required & then a different
instance for each request.

Yes, they are classes (just as ASP.NET web pages are) and so they are
instantiated upon request (each request).
2 - If someone making a request causes an unhandled exception then
their instance will die but it won't effect anyone else making
requests.

Well, the instance doesn't "die", as you put it. Instances stay in memory
until removed by the .NET Framework "Garbage Collector". The "Common
Language Runtime" of the .NET Framework is where code is processed and it is
where the exception will be created. You are correct though that this will
not affect the CLR's ability to handle other requests.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top