locked
How to progamatically replicate browser request/form post

    Pertanyaan

  • I need to automate retrieval of some files from a web host that does not support this through a service. Even when I send the user name and password in the url, I am directet to a login page first. How do I programatically perform the form post so that I can retrieve the file? The big problem is that this needs to happen on a daily basis and things like this don't work well when a human has to do it because they tend to forget things, take vacations, and call in sick. A scheduled program tens to not have either of these issues.

    Live large, love lots, and sail fast.

    • Dipindahkan oleh John Saunders 12 Maret 2012 15:44 Not ASMX q (From:ASMX Web Services and XML Serialization)
    09 Maret 2012 16:45

Semua Balasan

  • use a web traffic monitoring tool and change the request generation code to match the traffic.

    Note anytime the server changes web page structure you will have downtime. It is better to form a partnership with the information provider and obtain a code contract.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    09 Maret 2012 22:51
  • I've tried an MS network monitor tool but it doesn't show any of the HTTPS traffic.

    I fully understand what you're saying about changes to the web page being problematic. We have other applications that interact with other windows and the most problematic are web pages. Because they are created at a single source and often don't require any client side code, companies change them frequently and because of differences in screen resolution, window states, etc. trying to emulate mouse clicks to set the input to a certain field is very problematic. The problem is that service providers are often reluctant to respond to user requests. I'm trying to get in contact with the development team at the service provider but I am not having any luck so I'm left with trying to make it work on my side.


    Live large, love lots, and sail fast.

    12 Maret 2012 12:33
  • Find a monitor tool that can act as a man in the middle attack.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    12 Maret 2012 14:33
  • Any ideas of a good one you'd use? I don't want to spend days downloading trial software trying to find one what will work.

    Live large, love lots, and sail fast.

    12 Maret 2012 15:57
  • I am using Fiddler, but I am not a professional web developer. You can ask on forums.asp.net to get professional input.


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    12 Maret 2012 16:07