473,388 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Getting System.ObjectDisposedException from a web service call

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
Nov 21 '05 #1
0 2572

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: OldMacDonald | last post by:
I have a Web Service which I call ASynchronously. The problem its not getting kicked off. This is how I am calling it over HTTP and after calling the webservice I have a redirect to another page. I...
2
by: KJAbbott | last post by:
I have developed an application in VS 2005 for the Compact Framework. This application makes asynchronous web service calls on a timer. If the application is closed at a random time it will throw...
3
by: Grant Schenck | last post by:
Hello, I have a Windows Service developed in C# .NET. I'm making it a remote server and I can, via an IPC Channel, expose methods and call them from a client. However, I now want my remoted...
7
by: Brian | last post by:
hello Gentlemen, been trying to get a shell program working where I have a Windows service that also has a Notification icon in the system tray..... I got this idea from microsofts Visual...
0
by: *shame-faced* via DotNetMonster.com | last post by:
dear all, this is a slighly ridiculous thing to have done to my own code, but i've managed it nonetheless - i call a form with a datagrid, to display search results. everything was working fine....
3
by: shad3jd | last post by:
Hi everyone, first post here AND new to VB.NET .. So please excuse any goofs that follow! I have written a simple console application that extracts data from multiple XML files and inserts the...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
2
by: Bernard Borsu | last post by:
Hi ! My website breakdown at least 20 times per day with a System.ObjectDisposedException. The only information available are those given by the httpmodule treating the unhandledexception...
5
by: Brian | last post by:
Hello all. I have a simple application that I was using to test and understand the System.Timers.Timer and noticed that when I stop the application, on occasion, it throughs the following...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.