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);
}
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);
}