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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:48:01+00:00 2026-05-26T22:48:01+00:00

i have written a little Update Programm to keep an .exe up to date

  • 0

i have written a little “Update Programm” to keep an .exe up to date for the rest of my dev team. It used to work fine, but suddenly it stopped working.

I already noticed the problem: my remote stream does not start to read.

        Uri patch = new Uri("http://********/*********/" + GetVersion().ToString() + ".exe");
        Int64 patchsize = PatchSize(patch);
        var CurrentPath = String.Format("{0}\\", Environment.CurrentDirectory);
        Int64 IntSizeTotal = 0;
        Int64 IntRunning = 0;
        string strNextPatch = (version + ".exe");

        using (System.Net.WebClient client = new System.Net.WebClient())
        {
            using (System.IO.Stream streamRemote = client.OpenRead(patch))
            {
                using (System.IO.Stream streamLocal = new FileStream(CurrentPath + strNextPatch, FileMode.Create, FileAccess.Write, FileShare.None))
                {
                    int intByteSize = 0;

                    byte[] byteBuffer = new Byte[IntSizeTotal];

                    while ((intByteSize = streamRemote.Read(byteBuffer, 0, byteBuffer.Length)) > 0)
                    {
                        streamLocal.Write(byteBuffer, 0, intByteSize);

                        IntRunning += intByteSize;

                        double dIndex = (double)(IntRunning);
                        double dTotal = (double)byteBuffer.Length;
                        double dProgressPercentage = (dIndex / dTotal);
                        int intProgressPercentage = (int)(dProgressPercentage * 100);

                        worker.ReportProgress(intProgressPercentage);
                    }
                    streamLocal.Close();
                }
                streamRemote.Close();

GetVersion() only returns the current version number of the current server version of the .exe.
The problem lies here:

while ((intByteSize = streamRemote.Read(byteBuffer, 0, byteBuffer.Length)) > 0)

My streamRemote just does not return any bytes so this while clause is not filled.

Any advice for me?

  • 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-26T22:48:01+00:00Added an answer on May 26, 2026 at 10:48 pm

    I believe the problem is on the server. I’d run some checks:

    • Has anything changed on the configuration of the web server that stops you from downloading executables?
    • Are you connecting through a proxy?
    • Can you manually get to the same URL (under the same user credentials of your application)?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Much have been written about the benefits of using PDO::prepare , but little has
I am learning flex and have written a little app with a TextArea that
I'm using P4COM to communicate with our perforce server. I have written an little
Just wondering what little scripts/programs people here have written that helps one with his
I am adapting a little rmi client-server application. I have written several things :
I have a little game written in C#. It uses a database as back-end.
I have a little logging app (written in wxPython) that receives data from a
I have a little facebook iframe application written with rails and the facebooker plugin.
I have a simple little test app written in Flex 3 (MXML and some
I have a little routine that's run under Linux and Windows written in C

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.