473,664 Members | 2,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

When new instance of webservice?

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?

Sep 11 '07 #1
2 1933
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

<hv*@paralax.nl wrote in message
news:11******** **************@ o80g2000hse.goo glegroups.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
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?
Sep 11 '07 #2
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
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?

Sep 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5057
by: Jerome Cohen | last post by:
AI am trying to call a third-party web service. this service expects an XML fragment that contains the request plus other parameter. adding the web reference created the syntax below(reference.vb). I changed the data type for the structure that contains the XML data from the default "String" to "xml.xmldocument" to enable easy filling of the data. my client code creates an XML document class, fills the data using standard xml dom...
0
961
by: Abhimanyu Sirohi | last post by:
Hi All, I am very much confused about when to use WebServices. I don't see WebServices as a good choice because a new instance is created on every method call. Is a WebService capable of handling large number of requests and doing heavy processing. Also what if a client application calls a method on WebService but the WebService holds the call for say 30 seconds and do not return. Is there a performance hit because of this or any other...
0
1704
by: Michael Höhne | last post by:
Hi, we're developing some web services and use the local development server of Visual Studio 2005 to create, run and debug the project. The web service methods connect to a database hosted on a dedicated server and the Microsoft CRM 3.0 server, also on a separate machine. As the CRM server installation makes changes to the Active Directory, they are located in a separate domain, while the development machines are member of the companies...
1
1886
by: otto | last post by:
I have a technical question about WebServices. I have a solution with several projects (.exe and .dll). Each project have references to several webservices. I want to know if is possible to create a global instance of the webservice accesible from all projects to avoid the creation of the webservice instance each time a project calls the same service. Do you know My object in Visual Basic .NET 2005? Something similar but with more than one...
0
956
by: Andrés G. Aragoneses | last post by:
Hello. I have created a data type that inherits from one that comes from a WebService namespace. The data type is called "TreatedUpdate", and the WebService data type is called "TerminalUpdateInformation". When I serialize a class that contains a List<TreatedUpdate>, I obtain a scheme like this: <?xml version="1.0" encoding="utf-8"?>
2
580
by: syed | last post by:
Hi all, I am trying to invoke xml web service from dot net assembly . it is fails to create the proxy object and throw the below exception. Pls any suggestions. Error Desc: Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about
6
343
by: Jim S | last post by:
I have a .net framework 2.0 client (Pocket PC) and a .net 2.0 webservice that communicate on the same LAN. The Pocket PC has no problem consuming strings returned from the web service methoeds but I’m unable to receive and a custom object. The error occurs when the PocketPC app casts a returned object (WebServiceServer.objectA) from the webservice to pocketPC.ObjectA (results in InvalidCastExeption). ObjectA is a simple class and is...
2
3536
by: =?Utf-8?B?ZGF2ZWJ5dGhlc2Vh?= | last post by:
Hi folks, I'm just curious if it is possible to create a Singleton instance of a Web Service? Currently I create my web services in VS 2005, and then in my applications I add the Web Service via 'Add web Reference', which as you know doubt no is a great and easy mechanism for getting the proxy class etc.. al nice and quickly added to the project. However, say in my project I have two forms, and both use the Web reference....
10
9761
by: Anton | last post by:
Hi, when accessing a secured 3rd party webservice i'm getting a 401 HTTP Statuscode (unauthorized). When entering the url in a browser and entering the username and password manually, the wsdl is returned. So the username and password should be ok. I'm using this code: Merchant myMerch = new Merchant(); myMerch.merchantIdentifier=merchantId;
0
8437
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8348
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4185
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4351
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1759
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.