RE: SoapReceivers.Add
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Wed, 23 Nov 2005 07:38:56 GMT
{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang2052\f0\fs20 Hi John,
\par
\par Thanks for your response.
\par Regarding on your further question about
\par =============
\par I was trying to avoid having to instantiate a new object every time my service
\par gets called. I would like to instantiate the object once, either on the
\par first call to it or by starting it up manually, and then use it every time
\par the service is called until I turn it off.
\par =============
\par
\par I'm afraid this is not configureable in ASP.NET asmx webservice model. I think what you want is something like the Singletom object in .net remoting.... However, as for ASP.NET webservice, it is following the same request/response model as asp.net web page, when a request arrive the server , the ASP.NET runtime will pick up a worker thread and intialize a PageHanlder or webservice handler to process this request, so our webservcie object is created and process the request. After that the object is disposed.... We're not able to explicitly create the webService service class instance to service client request... .. If there're some states info we need to share between mutiple webservice method call... we may need to create a custom storage to maintain them (e.g using a static state collection.... in service class). This is also somewhat due to the XML webservcie's stateless and not object oriented...
\par
\par Thanks,
\par
\par Steven Cheng
\par Microsoft Online Support
\par
\par Get Secure! www.microsoft.com/security
\par (This posting is provided "AS IS", with no warranties, and confers no rights.)
\par
\par
\par \pard\li720 --------------------
\par Thread-Topic: SoapReceivers.Add
\par thread-index: AcXu7RNUFp1BIb+BSTaF75ij9sY9bw==
\par X-WBNR-Posting-Host: 157.254.98.204
\par From: "=?Utf-8?B?Sm9obiBHbG92ZXI=?=" <john.glover@xxxxxxxxxxxxxxxxx>
\par References: <5A8F3F6F-5CA3-4C79-8C27-1B054F8C9E63@xxxxxxxxxxxxx> <$aj6qCS7FHA.1236@xxxxxxxxxxxxxxxxxxxxx>
\par Subject: RE: SoapReceivers.Add
\par Date: Mon, 21 Nov 2005 14:44:04 -0800
\par Lines: 43
\par Message-ID: <AAF03AC6-54CB-4F28-AD25-F6DF879EA293@xxxxxxxxxxxxx>
\par MIME-Version: 1.0
\par Content-Type: text/plain;
\par \tab charset="Utf-8"
\par Content-Transfer-Encoding: 7bit
\par X-Newsreader: Microsoft CDO for Windows 2000
\par Content-Class: urn:content-classes:message
\par Importance: normal
\par Priority: normal
\par X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
\par Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements
\par NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
\par Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
\par Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.framework.webservices.enhancements:7690
\par X-Tomcat-NG: microsoft.public.dotnet.framework.webservices.enhancements
\par
\par Steven,
\par
\par Thanks for your response.
\par
\par I have no problem hosting the service in IIS, I've reviewed the example you
\par referenced as well as the other examples that ship with the WSE 3.0 bits. I
\par was trying to avoid having to instantiate a new object every time my service
\par gets called. I would like to instantiate the object once, either on the
\par first call to it or by starting it up manually, and then use it every time
\par the service is called until I turn it off.
\par
\par Is there an easy way to do this with an asmx web service? I would
\par appreciate any resources you can point me to that might get me started.
\par
\par In some of our existing code we have a service running which maintains the
\par state, and when a web service is called it runs some code to determine where
\par the service is living and then uses the service. I would like to avoid this
\par kind of look-up if possible.
\par
\par Thanks,
\par John Glover
\par
\par "Steven Cheng[MSFT]" wrote:
\par
\par > Hi John,
\par >
\par > As for this WSE802 error, it indicates that the certain protocol schema we
\par > specified in the Service's EndPointReference address is not support by the
\par > current hosting enviornemnt( appdomain...). Actually as for WSE SoapService
\par > over http protocol, we must host it in ASP.NET web application (deploy in
\par > IIS or through the VS.NET 2005's test server when developing ...). Normal
\par > application domain (console or winform) doesn't contain such a HTTP channel
\par > for processing http request so that it throws this exception... For
\par > registering and hosting SoapService over HTTP protocol in ASP.NET host
\par > environment, you can refer to the "HttpSyncStockService" example in the
\par > WSE3.0 sample....
\par >
\par > Thanks,
\par >
\par > Steven Cheng
\par > Microsoft Online Support
\par >
\par
\par \pard
\par
\par }
- References:
- RE: SoapReceivers.Add
- From: Steven Cheng[MSFT]
- RE: SoapReceivers.Add
- Prev by Date:
Re: WSE 3.0 Policy files - Next by Date:
Algorithm for Generating KeyIdentifier - Previous by thread:
RE: SoapReceivers.Add - Next by thread:
Re: SoapReceivers.Add - Index(es):