Where to store the handle for a web service?

Discussion in 'ASP .Net' started by Hans Merkl, Nov 22, 2005.

  1. Hans Merkl

    Hans Merkl Guest

    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
     
    Hans Merkl, Nov 22, 2005
    #1
    1. Advertising

  2. 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 <>
    | 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: am
    | Reply-To: am
    | Organization: RHM Media, LLC
    | Date: Mon, 21 Nov 2005 22:04:45 -0500
    | Message-ID: <1agb4rrq5rv5y$>
    | 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
    |
     
    Steven Cheng[MSFT], Nov 22, 2005
    #2
    1. Advertising

  3. Hans Merkl

    Max Guest

    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 <>
    >| 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: am
    >| Reply-To: am
    >| Organization: RHM Media, LLC
    >| Date: Mon, 21 Nov 2005 22:04:45 -0500
    >| Message-ID: <1agb4rrq5rv5y$>
    >| 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
    >|
     
    Max, Nov 22, 2005
    #3
  4. 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 <>
    | 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: <1agb4rrq5rv5y$>
    <>
    | Date: Tue, 22 Nov 2005 14:00:41 -0500
    | Message-ID: <1uy81i35phb8t.cpdxi18pajjq$>
    | 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 <>
    | >| 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: am
    | >| Reply-To: am
    | >| Organization: RHM Media, LLC
    | >| Date: Mon, 21 Nov 2005 22:04:45 -0500
    | >| Message-ID: <1agb4rrq5rv5y$>
    | >| 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
    | >|
    |
     
    Steven Cheng[MSFT], Nov 23, 2005
    #4
  5. Hans Merkl

    SeshadriMR

    Joined:
    May 13, 2008
    Messages:
    1
    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
     
    SeshadriMR, May 13, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dietrich
    Replies:
    1
    Views:
    656
    Joe Smith
    Jul 22, 2004
  2. =?Utf-8?B?UnVkeQ==?=

    to store or not to store an image

    =?Utf-8?B?UnVkeQ==?=, Mar 29, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    656
    =?Utf-8?B?UnVkeQ==?=
    Mar 30, 2005
  3. Max
    Replies:
    2
    Views:
    373
  4. Leon
    Replies:
    2
    Views:
    544
  5. Leo Violette
    Replies:
    0
    Views:
    1,069
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page