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

  • SEARCH
  • Home
  • 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 3969536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:58:31+00:00 2026-05-20T03:58:31+00:00

I have a strange situation in my .NET CF 3.5 Windows Mobile 6.5 application.

  • 0

I have a strange situation in my .NET CF 3.5 Windows Mobile 6.5 application.
I have 2 threads.

In 1st thread I do following:

try
{
  String url = "http://myserverurl";
  HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
  _currentRequest = request;
  request.Timeout = 10000;

  response = (HttpWebResponse)request.GetResponse();
  ConnectionStatus connStatus = response.StatusCode == HttpStatusCode.OK;
  response.Close();
}
catch (Exception e)
{ 
  //log e
}
finally
{

}

In 2n thread a call a WebService through a SoapHttpClientProtocol based class generated by WebService reference.

soapClient.Url = "http://myserverurl";
soapClient.MethodOnWebService();

In both cases the url is the same. The 1st thread is used for connection checking purpose. It does the WebRequest periodically to check whetrher the server is available and displays the connection status (not shown in code). 2nd thread calls WebService on the same server (url). I observed, that when one thread is executing a WebRequest the 2nd one gets blocked or event timeouted while executing a Web Method. They both look as interfering each other. Why? I wonder if windows mobile network stack simply creates only one socket connection for both threads if it realizes that both goes to the same target IP:port? What about sessions? On desktop Windows I would expect 2 sessions being created and at least 2 sockets on client machine.
Does anybody have any hints on how Windows Mobile (or .NET CF) manages connections and socket reusage?

Regards

  • 1 1 Answer
  • 0 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-20T03:58:32+00:00Added an answer on May 20, 2026 at 3:58 am

    I would guess that there is a third session somewhere. What you’re seeing is most likely due to a little-known (until it bites you, like now) recommended connection-limitation in the HTTP-protocol. Section 8.1.4 of RFC2068 says "A single-user client SHOULD maintain AT MOST 2 connections with any server or proxy". I’ve experienced the same limitation myself, most recently on Windows Phone 7.

    The limit lies in the WebRequest and the solution is to increase the limit:

    // set connection limit to 5
    ServicePointManger.DefaultConnectionLimit = 5;
    

    See e.g. this old blog entry from David Kline.

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

Sidebar

Related Questions

I have the next very strange situation and problem: .NET 4.0 application for diagram
I have a very strange situation. I´m working on a pretty big Java application
I am new to VB.net and facing a strange situation. I have a structure
I have a strange situation using asp ajax chart controls. I have an application
I have a strange situation on a production server. Connection for asp.net get queued
I have a strange situation with file_get_contents . A webservice returns me an url
I came into a really strange situation. I have the following setup: Parent window
I have the following strange situation here I need some help with: I am
I have a strange situation: in a .NET CF project there is a class
I have a strange situation where the following code works however XCode warns it

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.