Results 1 to 11 of 11

Thread: WebBrowser Sessions...

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    13

    WebBrowser Sessions...

    Hello!
    I'm using a webbrowser control in my program and I navigate to a page that uses sessions. I need to delete them somehow and I tried to close IE and enter it again and it worked, the sessions were deleted.
    But I've done it manually, and I need to do it through my program, so is there a way to imitate the closing and reopening of my webbrowser control?

    Thanks!

  2. #2
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Re: WebBrowser Sessions...

    What sessions are you talking about?
    Explain
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

  3. #3
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: WebBrowser Sessions...

    is this for a specific site, or in general? usually sites that use sessions will have a page that kills the session (the page that is navigated to when you click the "sign out" links on these types of sites). You may just be able to navigate your browser to that URL. If that doesn't work for you, then I would probably have some additional questions in order to try to provide a solution.

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    13

    Re: WebBrowser Sessions...

    It's a specific site, I've managed to navigate to the logout page, but I'm not sure it deletes the sessions.
    Generally, my goal is to register to a certain site twice, but I don't want that site to know I have there 2 users.
    In order to do it, after I registered the first time, I change my IP and delete all my cookies and temporary internet files through my program.
    But there is another thing that can reveal the fact I already registered and that is sessions, so I need to be sure they are deleted and if I'm not wrong, I can ensure that by reentering my internet browser.
    That's what I'm trying to do, somehow delete those sessions.
    Maybe you could tell me if I've taken all the steps needed to ensure that the site won't reveal the fact I registered twice, or are there another steps to be taken?

    Any help will be appreciated!

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: WebBrowser Sessions...

    You could just create the browser instances on the fly via code versus adding them statically at design time, and then dispose of them when you no longer want the instance to exist, which in theory should free up the underlying browser connection. Of course it does sound like you are likely trying to do something that could be considered malicious, as trying to fake out websites doesn't have too many legit purposes, so I am not sure how willing I am to personally assist.

  6. #6

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    13

    Re: WebBrowser Sessions...

    Sorry, but I did not understand what you said... maybe you could give me a little example? (btw I'm not doing anything malicious, in case you thought so...)

  7. #7
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: WebBrowser Sessions...

    Then what is the purpose of making a site think you are a totally different person 2 times in a row?

  8. #8
    Addicted Member DramaQueen's Avatar
    Join Date
    Mar 2010
    Posts
    187

    Re: WebBrowser Sessions...

    Whatever you're doing, it sounds like you could do it with much more efficiency with httpWebRequests. Say, you need to fill 3 textboxes and hit a button, you could use a WebRequest and its properties to post the data directly. More fun too!

  9. #9

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    13

    Re: WebBrowser Sessions...

    In overall, I'm trying to secure my own website by thinking like the user, what he would try to do.
    DramaQueen, how can I fill textboxes with httpWebRequests? Where can I find a tutorial about it?
    And another quiestion: how is it possible that I login to a site, change my IP, delete all my cookies(I'm remain in the site) and I keep browsing like I'm logged in? How can the site identify that it's me?

  10. #10
    Addicted Member DramaQueen's Avatar
    Join Date
    Mar 2010
    Posts
    187

    Re: WebBrowser Sessions...

    I'm running late so sorry for the short answers.

    1. When using a WebRequest you don't need the textboxes. What happens when someone clicks your button is something like this...
    userid = txtUserID.Value, userpass = txtUserPass.Value
    "POST userid, userpass"

    WebRequest skips the textfield part, and posts the desired data right away. Much faster, much more efficient.

    2. If he's using a proxy to hide his IP, you'll have to detect the proxy by comparing his IP to a list of known proxy IPs. If he just doesn't have a static IP you should be ok by blocking his IP range. That's pretty much what you can do, AFAIK.

  11. #11
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Re: WebBrowser Sessions...

    Quote Originally Posted by ganav View Post
    btw I'm not doing anything malicious, in case you thought so...
    lol... if i had a nickel.

    not buyin' it. spammer

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