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 4240788
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:12:48+00:00 2026-05-21T03:12:48+00:00

I’ve been battling with this issue for over 2 weeks now and have gotten

  • 0

I’ve been battling with this issue for over 2 weeks now and have gotten nowhere.

First the environment: Windows 2003 R2 SP2 / SharePoint 2007 SP1 / .NET 3.5.

Basically, we are making web service calls to gather data from a remote API. The API has several endpoints for REST and several for SOAP. The endpoints are HTTPS endpoints with digest authentication. When we make calls with the SOAP endpoints, everything seems to work just fine. But then we try to make a call using REST and the thread hangs then dies a horrible death when IIS decides that the thread isn’t responding anymore and kills it. At first, we thought this was an SSL issue (and it still might be) because we don’t see any issues when using the HTTP endpoints (route to the same API just not SSL).

Below is the code we’re using to make the REST call:

private void Process(HttpContext context, String url, String restParam)
{
    ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(validateCertificate);

    WriteLogMessage("Start Process");
    String pattern = "{0}{1}";
    String address = String.Format(pattern, url, restParam);

    WriteLogMessage("ADDRESS is" + address);
    LSWebClient client = new LSWebClient();
    client.Timeout = 600000;

    WriteLogMessage("TIMEOUT (client.Timeout) is " + client.Timeout.ToString());
    client.Credentials = new NetworkCredential(XYZConfigurationSettings.APIUserName, XYZConfigurationSettings.APIPassword);

    try {
        String result = client.DownloadString(address);
        WriteLogMessage("End Process. RESULT length is " + (result != null ? result.Length : 0));
        context.Response.Write(result);
    } 
    catch (Exception ex) 
    {
        WriteLogMessage("EXCEPTION!!! Message----" + ex.Message + "---- StackTrace ----" + ex.StackTrace + "");
    }
}

private bool validateCertificate(object sender, X509Certificate cert, X509Chain chain, System.Net.Security.SslPolicyErrors error)
{
    WriteLogMessage("bypassAllCertificateStuff");
    return true;
}

So, crappy code aside, we put in a few things here to try to get around what we thought was an SSL Certificate issue. (setting the request timeout to 10 minutes, using custom certificate validation, etc…) However, none of this seems to fix the issue.

Here’s the result of our logging:

2/28/2011 3:35:28 PM: Start
2/28/2011 3:35:28 PM: Start Process
2/28/2011 3:35:28 PM: ADDRESS ishttps://<host>/ws/rs/v1/taxonomy/TA/root/
2/28/2011 3:35:28 PM: TIMEOUT (client.Timeout) is 600000
2/28/2011 3:35:50 PM: CheckValidationResult
2/28/2011 3:35:50 PM: bypassAllCertificateStuff
2/28/2011 3:41:51 PM: EXCEPTION!!! Message ----Thread was being aborted.---- StackTrace ----   at System.Net.Connection.CompleteStartConnection(Boolean async, HttpWebRequest httpWebRequest)
   at System.Net.Connection.CompleteStartRequest(Boolean onSubmitThread, HttpWebRequest request, TriState needReConnect)
   at System.Net.Connection.SubmitRequest(HttpWebRequest request)
   at System.Net.ServicePoint.SubmitRequest(HttpWebRequest request, String connName)
   at System.Net.HttpWebRequest.SubmitRequest(ServicePoint servicePoint)
   at System.Net.HttpWebRequest.GetResponse()
   at System.Net.WebClient.GetWebResponse(WebRequest request)
   at System.Net.WebClient.DownloadBits(WebRequest request, Stream writeStream, CompletionDelegate completionDelegate, AsyncOperation asyncOp)
   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
   at System.Net.WebClient.DownloadString(Uri address)
   at System.Net.WebClient.DownloadString(String address)
   at XYZ.DAO.Handlers.RestServiceHandler.Process(HttpContext context, String url, String restParam)
   at XYZ.DAO.Handlers.RestServiceHandler.ProcessRequest(HttpContext context)----

I have attempted to use my browser to view the return data, but the browser is IE6, which doesn’t support SSL. However, I can see (in Fiddler / Charles proxy) that it does attempt to make the request and receives a 401 error but since I can not see server traffic using these programs I can not tell at exactly what step the error is happening.

To make matters worse, I can not reproduce this issue on any other server I have (note: they are all Windows 2008 servers).

So, in summary, here’s what I’ve found:

SOAP – work
REST – no work

Win2008 – work
Win2003 – no work

HTTP – work
HTTPS – no work

If anyone has any insight or any other debugging / information gathering that I haven’t tried I would be extremely greatful.

  • 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-21T03:12:49+00:00Added an answer on May 21, 2026 at 3:12 am

    I’ve found what was causing the web service call to hang – the issue was that the service we were calling was using replay attack protection along with digest security:

    1. Our server would send an initial
      request sans security header
    2. The request was responded to with a
      standard 401 challenge providing a
      nonce for use. (That nonce expires
      after 10 seconds after the
      challenge)
    3. Our server then took 30 seconds to
      generate a second response using
      this nonce
    4. So the remote server would then find the
      expired nonce and again issue
      another 401 challenge.

    The cycle would continue until the local server’s thread was terminated. However, why our local server is taking 30 $@#%! seconds to generate a security header is beyond me. I inspected the logs that were provided through the diagnostics above, but none of it was much help. I’m going to chalk it up to the server being overloaded and not having enough memory to process it’s way out of a wet paper bag.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6
I'm looking for suggestions for debugging... If you view this site in Firefox or
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I have just tried to save a simple *.rtf file with some websites and
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.