Results 1 to 11 of 11

Thread: Generate http request

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    115

    Generate http request

    Hello guys,

    I want to create a simple program that will test my server. It should send multiple requests for some file (.html, .php, .jpg ...) but it would be able to generate and send at least couple of hundred of those IN A SECOND!

    I tried using Webbrowser control... well its kinda slow, plus the most i got out of it is probably 5 request per second may be a little more once in a while.

    So I would assume I have to have like an array or a collection of those requests READY to be send in one instant.

    I'm not trying to develop a next SPECweb2005 here but the general idea is the same.

    Appriciate all the help!

    p.s. either vb.net or classic vb is fine with me.

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Generate http request

    Sounds like a DoS attack program...

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    115

    Re: Generate http request

    Quote Originally Posted by stanav
    Sounds like a DoS attack program...


    if i wanted a DoS attack program I would download one of the net...

    this is for my project in grad school. Test the performace of the webserver...

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    115

    Re: Generate http request

    anybody?

  5. #5
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    Re: Generate http request

    doesn't the microsoft application test center in MSVS 2003 do just what you're requesting?
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

  6. #6
    Junior Member
    Join Date
    Nov 2006
    Posts
    31

    Re: Generate http request

    You could try looking at System.Net.WebClient and System.Threading as a start...

    Create multiple threads that all have an instance of WebClient and make requests over and over again to a server.

    Hope this helps,
    Brian Swanson

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    115

    Re: Generate http request

    Quote Originally Posted by TokersBall_CDXX
    doesn't the microsoft application test center in MSVS 2003 do just what you're requesting?
    Interesting I use VS 2005 and don't have it...

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    115

    Re: Generate http request

    Quote Originally Posted by purpleant
    You could try looking at System.Net.WebClient and System.Threading as a start...

    Create multiple threads that all have an instance of WebClient and make requests over and over again to a server.

    Hope this helps,
    Brian Swanson
    OK, thank you for the hint.

    I created some simple app, it creates whatever number of threads I need that send http requests.

    Now I can have a lot more requests PER second but it still not enough for the project.
    Is it possible to create lets say 1000 Threads that will send a request but not start them untill all of them are created and then start all of them at once but not one by one?

  9. #9
    Junior Member
    Join Date
    Nov 2006
    Posts
    31

    Re: Generate http request

    I'm not very good with thread synchronization and such, but my immediate thought is have a loop at the beginning of each thread method that waits for a global boolean to be set to true, and set the global to true after all threads are created...

    Hope this helps,
    Brian Swanson

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    115

    Re: Generate http request

    Quote Originally Posted by purpleant
    I'm not very good with thread synchronization and such, but my immediate thought is have a loop at the beginning of each thread method that waits for a global boolean to be set to true, and set the global to true after all threads are created...

    Hope this helps,
    Brian Swanson
    that's what i was thinking as well, but the thing is:
    if i created 1000 threads BUT not start them, I will have to go through a loop anyhow to start all of them and it will take time as well...

  11. #11
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    Re: Generate http request

    Quote Originally Posted by rookie7799
    Interesting I use VS 2005 and don't have it...

    if you open the vs 2005 IDE with no solution or projects, one of the menu selections is Test.
    I believe this is where microsoft moved their application test environment.
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width