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

The Archive Base Latest Questions

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

I am trying to make a HttpWebRequest which registers accounts for me. I’m using

  • 0

I am trying to make a HttpWebRequest which registers accounts for me.
I’m using a loop for it to register new accounts with only 1 thing changing, the username.
But for some reason it only works twice, the third time it will reach a certain line calling the function “webRequest.GetRequestStream();” and it will never finish that, it will not throw an error or anything.
This is my first HttpWebRequest, and it is very messy.
For people wondering, value is a string with the registration ‘values’ in there. The first 2 times do actually register the accounts, so it does work.

    public static HttpWebRequest Get()
    {
        HttpWebRequest webRequest = WebRequest.Create("http://87.255.55.218/register") as HttpWebRequest;
        webRequest.Method = "POST";
        webRequest.Host = "87.255.55.218";
        webRequest.UserAgent = "Hacker";
        webRequest.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
        webRequest.Referer = "http://yougothacked.com";
        webRequest.ContentType = "application/x-www-form-urlencoded";

        webRequest.Headers.Add(HttpRequestHeader.KeepAlive, "115");
        return webRequest;
    }

    public static void Register(string username)
    {
        string value = Value.Replace("replace", username);
        WebRequest webRequest = Get();
        webRequest.ContentLength = value.Length;
        Thread.Sleep(50);
        Stream reqStream = webRequest.GetRequestStream();

        reqStream.Write(Encoding.ASCII.GetBytes(value), 0, value.Length);
        Thread.Sleep(50);
        reqStream.Flush();
        reqStream.Close();
        reqStream.Dispose();
    }

What could be wrong?

  • 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-16T23:16:39+00:00Added an answer on May 16, 2026 at 11:16 pm

    I strongly suspect that the problem is in some code you haven’t shown – namely that when you use the request, you’re not disposing of the response properly. (Just like you should put the code using the request stream in a using block.)

    If you don’t dispose of the response, that response will hold onto a connection to the server until a finalizer releases it. Connections to individual servers are pooled.

    In short: make sure you put the response in a using block like this:

    using (WebResponse response = req.GetResponse())
    {
        ...
    }
    

    and I suspect you’ll find it works however many requests you make.

    On the other hand, using WebClient as Darin suggested may well make your life simpler.

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

Sidebar

Related Questions

I'm trying to make an SSL call using HTTPWebRequest and its continually failing saying
trying to make a page which will recursively call a function until a limit
I'm trying make a static text which if too long for the sizer, will
I am trying to make a voice recognition thing with google's voice api. I
I am trying make such application which speak automatically when the image loaded it
I am trying to make an HttpWebRequest from an ASP.Net page on a server
I am trying to make a json call using C#. I made a stab
I'm trying make some stuff in jQuery using ASP.NET. But the ID from runat=server
I'm trying make this code which is from a Dictionary of Arrays (CODE) from
I'm trying to make multiple consecutive HttpWebRequest in WP7. Each one uses info (an

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.