Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1093503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:50:10+00:00 2026-05-16T23:50:10+00:00

I must build a Application that will use Webclient multiple times to retrieve every

  • 0

I must build a Application that will use Webclient multiple times to retrieve every “t” seconds information from a server.

Here is a small plan to show you what I’m doing in my application:

  1. Connect to the Web Client “USER_LOGIN” that returns me a GUID(user unique ID). I save it and keep it to use it in future Web Client calls.
  2. Connect to the Web Client “USER_GETINFO” using the GUID I saved before as parameter. This Web Service returns an array of strings holding all my personal user information( my Name, Age, Email, etc…). => I save the array information this way: Textblock.Text = e.Result[2].
  3. Starting a Dispatcher.Timer with a 2 seconds Tick to start my Loop. (Purpose of this is to retrieve information and update it every 2 seconds)
  4. Connect to the Web Client “USER GETFRIEND”, wich is in my Timer, giving him the GUID as parameter. It returns me an array filled with my friends informations(Name, email, message, etc…). I inserted this WebClient in the timer so my friend list refreshes every 2 seconds.

I am able to create all the steps without any error until step 3. When I call the “USER_GETFRIEND” Web Client I am facing two major problems:

  • On one side I noticed that my number of Thread increased dramatically. => I always thought that when a WebClient had finished its instructions it would shut down by itself, but apparently that does not happen in Asyncronous calls.

  • And on the other side I was surprised to see that using the same proxy for two Webclient calls(ie: if i declare test.MainSoapClient proxy = new test.MainSoapClient()), the data i would retrieve from “USER_GETFRIEND” e.Result, was sent directly to my “USER_GETINFO” array. And so my Name and Email adresses on the UI were replaced by the same value in the USER_GETFRIEND array. So my Name is changed to my friends email and so on…

I would like to know if it’s possible to close a WebClient call(or Thread) that I am not using anymore to prevent any conflicts? Or if someone has any suggestion concerning my code and the way i should develop my application please feel free to propose.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:50:11+00:00Added an answer on May 16, 2026 at 11:50 pm

    I got the answer a few weeks ago and figured out it was important to answer my own question.

    My whole problem was that I wasn’t unsubscribing from my asynchronous calls and that I was using the same proxy class from “Add Service reference”:

    So when I was using:

    proxy.webservice += new Eventhandler<whateverinhere>(my_method);
    

    I never did:

    proxy.webservice -= new Eventhandler<whateverinhere>(my_method);
    

    Hope it will help someone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Mac application that I must build against the Mac OS 10.4
We are using an extractor application that will export data from the database to
I'm planning to build an application that must allow the user to set up
I'm developing an application that makes heavy use of web services. I will be
I want to build a mobile application that allows end users to sign up
I am in the process of designing a trading application which will use a
I'm trying to build an NSIS installer that will do the following: 1 When
I have an application that is multitenant, that is, I have multiple clients that
Our server application receives information about rows to add to the database at a
I want to build an Web-application using jsp/servlets where we will be able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.