Re: Single instance???

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



erymuzuan wrote:
One way is you can utilise ASP.Net Session state framework to achieve this. or you can create a singleton remoting object on the server.

regards
erymuzuan mustapa

Sniper wrote:

Hi guys

I have facing a small problem, it's like this.
There is a web service which has a web method call OpenPublicConnection which will open a connection to the SQL Server, and there is a web method call StartTransaction to start a tranaction for the class level connection which is opened by the OpenPublicConection Method. But when I call StartTransaction it's retruing an error saing the connection is closed... ? Is there anyway to fix this?? is there anyway to keep the conneciton object alive in the server side till client call the StartTransaction Method after calling the OpenPublicConnection method...?


Thanks for your help
-Aruna

You could try to solve this problem, but I think the problem is in your web service design. You should not leave open database connections/transactions between web service calls - this is very inefficient and can cause many problems when clients will be making concurrent calls to your web service.
Better think how to make your web service stateless.


Best regards
Rafal Gwizdala
.



Relevant Pages

  • Re: WebService timing out
    ... looping on items and calling the web service for each item. ... There is a KeepAlive property in the HttpWebRequest but the web ... > realize that the underlying connection used by the ServicePoint (used ... > server closes the connection. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: data logging
    ... to a server at configurable frequency and a simple web service ... establish a connection when the timer fires, ... to push your data to the server. ... > problem since the data does not have to be retained on the mobile device. ...
    (microsoft.public.pocketpc.developer)
  • ASP.Net calling SSL Web Service (PayPal) fails: "Could not establish secure channel for SSL/TLS
    ... Localhost is a Windows Server 2003 with the June 2003 Hotfix Rollup. ... I am attempting to call a PayPal Web Service. ... Web Exception: System.Net.WebException: The underlying connection was ... I repeated the failing request and checked the "System" section in the ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Connecting PDA/Phone to Web Services using SSL?
    ... I am using the following code to make a connection to a remote web service ... running on my windows 2003 server. ... I have assigned a certificate to the default web site ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: TCPClient Question
    ... you are writing both the server and the client. ... The server could be a Web ... Service calls to a Web Service periodically, ... HTTP is a very reliable protocol, and maintaining an open TCP/IP connection ...
    (microsoft.public.dotnet.languages.csharp)