using the KeepAlive attribute of HttpWebRequest

V

Vijay

Hello All,

when loginService.login is invoked in Test(), will the keepAlive setting
work?

This is for a .NET Framework 1.1 code base... and webservices application..


//Actual class...
public class LoginService :
System.Web.Services.Protocols.SoapHttpClientProtocol
{
public LoginService()
{
this.Url = "http://www.myDom.com/login";

Uri sUri = new Uri(this.Url);
WebRequest webReq = this.GetWebRequest(sUri);
((HttpWebRequest)webReq).KeepAlive = false;

}

...
[System.Web.Services.Protocols.SoapRpcMethodAttribute("login",
RequestNamespace="http://www.myDom.com", ResponseNamespace="www.myDom.com")]
[return: System.Xml.Serialization.SoapElementAttribute("Result")]
public MyInfo login(string name, string pwd)
{
object[] results = this.Invoke("login", new object[]
{name,pwd});
return ((MyInfo)(results[0]));
}
....


}

// Invoker class
public void Test()
{
string user = "Tom";
string pwd = "Tom";

LoginService loginService = new LoginService();
loginService.Login(user,pwd);

}
 

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

Top