Hello all,
Environment - Winforms app calling into a webservice
Exception returned - "A first chance exception of
type 'System.ObjectDisposedException' occurred in
system.dll"
Additional information: Cannot access a disposed object
named "System.Net.Sockets.NetworkStream".
We are making a webmethod call that gets back a simple ID
[integer].
The generated proxy -
-------------------
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute
("http://tempuri.org/GenerateEntityID",
RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterS
tyle.Wrapped)]
public void GenerateEntityID(string IdentityType,
int IdentityCount, ref int IdentityValue) {
object[] results = this.Invoke
("GenerateEntityID", new object[] {
IdentityType,
IdentityCount,
IdentityValue});
IdentityValue = ((int)(results[0]));
}
Consumer Code -
-----------------
LHWebService.Registration registration = new
LHWebService.Registration();
registration.PreAuthenticate = true;
registration.Credentials =
CredentialCache.DefaultCredentials;
registration.GenerateEntityID
(tableName,number,ref entityID);
Would appreciate any help to solve this problem
Regards
Naveen