EldoS | Feel safer!

Software components for data protection, secure storage and transfer

.NET TElHTTPSClient.Post takes a minute to return

Posted: 03/03/2014 20:51:10
by Mike Gordon (Basic support level)
Joined: 03/03/2014
Posts: 2

I'm evaluating SecureBlackbox for a Windows Phone 7.5 application which uses HTTPS Post method. I use the OnData callback to get the response body and this returns in less than 5 seconds, but the Post call does not return for up to a minute.

Is there a way to control this timeout as the SocketTimeout has no effect on when the Post returns?

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using SBHTTPSClient;
using SBSimpleSSL;
using SBStringList;

namespace SimpleHTTPSDemo
    public partial class MainPage : PhoneApplicationPage
        private string ResponseBody = string.Empty;
        private TElHTTPSClient HTTPSClient = null;

        // Constructor
        public MainPage()
            SBUtils.Unit.SetLicenseKey("Some Key");

        private void btnConnect_Click(object sender, RoutedEventArgs e)
            using (HTTPSClient = new SBHTTPSClient.TElHTTPSClient())
                HTTPSClient.OnCertificateValidate += HTTPSClient_OnCertificateValidate;
                HTTPSClient.OnData += HTTPSClient_OnData;
                // Set up the form params
                TElStringList SL = new TElStringList();
                SL.Add("username", tbUsername.Text);
                SL.Add("password", tbPassword.Password);

                // Set up the stream to get the response
                Stream _os = new MemoryStream();
                HTTPSClient.OutputStream = _os;
                ResponseBody = string.Empty;

                int code = HTTPSClient.Post("https://www.example.com/pubs/m_login", SL);
                HTTP_Code.Text = code.ToString();

                HTTPSClient.OutputStream = null;

        void HTTPSClient_OnCertificateValidate(object Sender, SBX509.TElX509Certificate X509Certificate, ref SBUtils.TSBBoolean Validate)
            Validate = true;

        void HTTPSClient_OnData(object Sender, byte[] Buffer)
            ResponseBody += Encoding.UTF8.GetString(Buffer, 0, Buffer.Length);
Posted: 03/04/2014 02:23:33
by Eugene Mayevski (Team)

Thank you for the report. The issue is server-specific and while it has been reported several times, we couldn't reproduce it. If you can give us the URL to test the code with (maybe in confidential HelpDesk), that would be great. Also there's a new build 246 on the site (just download the files, cause we have not yet updated version number and date) which *possibly* will solve the issue (we have grounds to expect that it does).

Sincerely yours
Eugene Mayevski
Posted: 03/07/2014 00:39:56
by Mike Gordon (Basic support level)
Joined: 03/03/2014
Posts: 2


I sent the web site URL through the Helpdesk link you provided. I also installed the 11.0.246 version and the result was unchanged--the POST call took approximately 60 seconds to return but the OnData callback had a server response within 5 seconds from the call to Post.
Posted: 03/07/2014 02:08:11
by Eugene Mayevski (Team)

Thank you for checking. We'll continue in HelpDesk where you have provided test info.

Sincerely yours
Eugene Mayevski
Posted: 08/14/2014 18:22:25
by David Steward (Standard support level)
Joined: 05/05/2009
Posts: 3

I also have this problem. Is there a timeout that can be set in Post?
Posted: 08/15/2014 01:58:18
by Eugene Mayevski (Team)

Mr.Steward, unfortunately this problem was never reproduced and thus never solved.

Timeout is set using SocketTimeout property, but the problem is not in timeout itself.

If you can help us by working with us on reproducing and fixing the issue, I will move your question to the HelpDesk and we'll try to investigate the problem deeper.

Sincerely yours
Eugene Mayevski



Topic viewed 1520 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!