Where to store the handle for a web service?

H

Hans Merkl

Hi,

I am helping to build a web app that's pretty much a wrapper around a web
service. The question now is how to store the handle of the web service
object between requests. My client is using SQL server for session state so
I don't think I can store the web service handle there since it's not
serializable.

Opening up a connection to this particular service is quite slow so I don't
want to reopen it for every request.

I am looking for suggestions how to store the web service handle. Any
ideas?

Thanks

Hans
 
S

Steven Cheng[MSFT]

Hi Hans,

Thanks for your posting.
Regarding on the webservice handle persist question, I'd like to confirm
something first:
1. Are you calling an remote asp.net webservice in your certain asp.net
webapplication and the asp.net web app is using sqlserver session?

2. Does he webservice you mentioned means the client proxy instance which
will send the SOAP Request and receive SOAP response from service server?

Based on my understanding, the ASP.NET Webservice's client proxy class is a
concrete class derived from SoapHttpClientProtocol class. And this class
is simply create webrequest components (HttpWebRequest.... for webservice
over http...) and send request and receive response through the webRequest
component. Also, I don't think there has any "handler" concept in such
model since the underlying http connection to the server between client
are managed by the ServicePointManger... We can not explicitly control
which connection our webservice client proxy will use (or manually create
and assign a connection to our proxy...). As far as I know, the
SoapHttpClientProtocol( just our webservice proxy) has an
"ConnectionGroupName" property which is used to specify a certain
"GroupName" for the underlying WebRequest component our webservice proxy
use. Thus, when the ServicePointManager will be asked to give our
webservice proxy a certain connection to a certain remote server, it will
help reuse and share existing connections between those webRequest
components that has the same "ConnectionGroupName".....

#WebClientProtocol.ConnectionGroupName Property
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebservicespro
tocolswebclientprotocolclassconnectiongroupnametopic.asp?frame=true

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)







--------------------
| From: Hans Merkl <[email protected]>
| Subject: Where to store the handle for a web service?
| User-Agent: 40tude_Dialog/2.0.14.1
| MIME-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| Sender: (e-mail address removed)
| Reply-To: (e-mail address removed)
| Organization: RHM Media, LLC
| Date: Mon, 21 Nov 2005 22:04:45 -0500
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: pcp0011547978pcs.anapol01.md.comcast.net 68.54.166.32
| Lines: 1
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:360024
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi,
|
| I am helping to build a web app that's pretty much a wrapper around a web
| service. The question now is how to store the handle of the web service
| object between requests. My client is using SQL server for session state
so
| I don't think I can store the web service handle there since it's not
| serializable.
|
| Opening up a connection to this particular service is quite slow so I
don't
| want to reopen it for every request.
|
| I am looking for suggestions how to store the web service handle. Any
| ideas?
|
| Thanks
|
| Hans
|
 
M

Max

Steven,

Thanks for the detailed explanation. Definitely ome food for thoughts... I
have convinced my client to use memory session state for now so for now I
can ignore the problem.

Hans
 
S

Steven Cheng[MSFT]

Thank you for your response Hans.

Well, if there is anything else need assistance later, please feel free to
post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: Max <[email protected]>
| Subject: Re: Where to store the handle for a web service?
| User-Agent: 40tude_Dialog/2.0.14.1
| MIME-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| References: <[email protected]>
<[email protected]>
| Date: Tue, 22 Nov 2005 14:00:41 -0500
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: pcp0011547978pcs.anapol01.md.comcast.net 68.54.166.32
| Lines: 1
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:360200
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Steven,
|
| Thanks for the detailed explanation. Definitely ome food for thoughts... I
| have convinced my client to use memory session state for now so for now I
| can ignore the problem.
|
| Hans
|
| On Tue, 22 Nov 2005 09:38:27 GMT, Steven Cheng[MSFT] wrote:
|
| > Hi Hans,
| >
| > Thanks for your posting.
| > Regarding on the webservice handle persist question, I'd like to
confirm
| > something first:
| > 1. Are you calling an remote asp.net webservice in your certain asp.net
| > webapplication and the asp.net web app is using sqlserver session?
| >
| > 2. Does he webservice you mentioned means the client proxy instance
which
| > will send the SOAP Request and receive SOAP response from service
server?
| >
| > Based on my understanding, the ASP.NET Webservice's client proxy class
is a
| > concrete class derived from SoapHttpClientProtocol class. And this
class
| > is simply create webrequest components (HttpWebRequest.... for
webservice
| > over http...) and send request and receive response through the
webRequest
| > component. Also, I don't think there has any "handler" concept in such
| > model since the underlying http connection to the server between client

| > are managed by the ServicePointManger... We can not explicitly control
| > which connection our webservice client proxy will use (or manually
create
| > and assign a connection to our proxy...). As far as I know, the
| > SoapHttpClientProtocol( just our webservice proxy) has an
| > "ConnectionGroupName" property which is used to specify a certain
| > "GroupName" for the underlying WebRequest component our webservice
proxy
| > use. Thus, when the ServicePointManager will be asked to give our
| > webservice proxy a certain connection to a certain remote server, it
will
| > help reuse and share existing connections between those webRequest
| > components that has the same "ConnectionGroupName".....
| >
| > #WebClientProtocol.ConnectionGroupName Property
| >
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebservicespro
| > tocolswebclientprotocolclassconnectiongroupnametopic.asp?frame=true
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| >
| >
| >
| > --------------------
| >| From: Hans Merkl <[email protected]>
| >| Subject: Where to store the handle for a web service?
| >| User-Agent: 40tude_Dialog/2.0.14.1
| >| MIME-Version: 1.0
| >| Content-Type: text/plain; charset="us-ascii"
| >| Content-Transfer-Encoding: 7bit
| >| Sender: (e-mail address removed)
| >| Reply-To: (e-mail address removed)
| >| Organization: RHM Media, LLC
| >| Date: Mon, 21 Nov 2005 22:04:45 -0500
| >| Message-ID: <[email protected]>
| >| Newsgroups: microsoft.public.dotnet.framework.aspnet
| >| NNTP-Posting-Host: pcp0011547978pcs.anapol01.md.comcast.net
68.54.166.32
| >| Lines: 1
| >| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| >| Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:360024
| >| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| >|
| >| Hi,
| >|
| >| I am helping to build a web app that's pretty much a wrapper around a
web
| >| service. The question now is how to store the handle of the web service
| >| object between requests. My client is using SQL server for session
state
| > so
| >| I don't think I can store the web service handle there since it's not
| >| serializable.
| >|
| >| Opening up a connection to this particular service is quite slow so I
| > don't
| >| want to reopen it for every request.
| >|
| >| I am looking for suggestions how to store the web service handle. Any
| >| ideas?
| >|
| >| Thanks
| >|
| >| Hans
| >|
|
 
Joined
May 13, 2008
Messages
1
Reaction score
0
Hi Steven,

I have the same issue. If I specify the connectiongroupname, as you had mentioned, the ServicePoint manager will use the shared connection. If the connection has been closed, then a new connection will be created and that'll be used. Please correct me if I'm wrong
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top