reading http post to an asp.net page

so my company is a user of infusionsoft.

in the crm you are able to after an action occurs send an http post to another site.  i'm trying to do this to create a script that will log an action to my local sql db.  however, they dont tell you what variables they are sending over in the post.  so what i did was set up a simple page with a page_load event that will read the request.rawurl and print it to a text file.  however, nothing seems to be happening.  when i visit the site in my browser, it logs it okay.  

am i wrong that an http post would just be posting to a web page with query parameters as in:  http://www.site.com/logit.aspx?pid=something&action=logme ?

or is a post different and can not be read in this manner because the page load is never executing?  I've read a couple things about this and but i'll i've found was how to do construct a get within my .net application and then read the post from that get w/ a defined uri that i set up.  any help would be appreciated experts!!  any tips on a way or a better idea how to do this would be fantastic!
LVL 1
rpzachAsked:
Who is Participating?
 
Robert SchuttConnect With a Mentor Software EngineerCommented:
Ok, that doesn't seem too complicated and you say it works 'manually' so I think we need to start checking another way.

Can you please make sure that IIS logging is enabled (and preferably with all log fields) for the website/application/virtual directory that is being called. Then repeat your 2 tests (manually  and from the crm app) and look in the logs what is being called exactly. It should be possible for starters to check if it's Form or QueryString that is being used.
0
 
Robert SchuttSoftware EngineerCommented:
The fields will only be sent in the querystring (behind the question mark) if the form's method is "GET". With a "POST" type form, which is more common for some actions, you will have to read Request.Form for example to get to the fields that were sent.

However, if you are not getting anything from the Page_Load then there may be another problem altogether. How are you debugging this?
0
 
rpzachAuthor Commented:
I'm trying to loop through AllKeys and then i'm just printing it to a text file.  The WriteToLog function works well, it works if i manually go to the site i get a log entry...

Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Dim logStr$
       
        For Each MyKey In Request.Form.AllKeys
            logStr = logStr & vbCrLf & MyKey

        Next
        Funcs.WriteToLog(logStr, True)
    End Sub
0
 
rpzachAuthor Commented:
Robert,

That was a great tip.  The page was throwing an error I wasn't seeing I guess (I was debugging from the server so my writelogfunc worked great, but not so much publicly :P).

Thanks man!

Zach
0
All Courses

From novice to tech pro — start learning today.