Last post Jan 08, 2019 02:42 PM by mgebhard
Jan 07, 2019 09:21 PM|dlchase|LINK
We are using an http webhandler to get querystrings, etc. from a SMS text vendor as noted in code sample below. Is it possible to grab the page content as well? If so, how?
<%@ WebHandler Language="VB" Class="SMSReplyHandler" %>
Public Class SMSReplyHandler : Implements IHttpHandler
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.ContentType = "text/plain"
Dim strMOMessageID As String = ""
Dim strapiID As String = ""
If Not context.Request.QueryString("api_id") Is Nothing Then
strapiID = context.Request.QueryString("api_id")
If Not context.Request.QueryString("from") Is Nothing Then
strFromQS = context.Request.QueryString("from")
If Not context.Request.QueryString("text") Is Nothing Then
strTextQS = context.Request.QueryString("text")
strBody = "Message reply = " & strTextQS
<remainder of code>
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Jan 08, 2019 12:49 PM|Brando ZWZ|LINK
Is it possible to grab the page content as well? If so, how?
What you mean about grab the page content?
Do you mean you want to grab send page's content?
Could you please tell me how you call this handler?By ajax or something else?
If you could post more details information, it will be more easily for us to understand your issue and find out the solution.
Jan 08, 2019 02:24 PM|dlchase|LINK
Yes, I want to grab the sending content from the 3rd party. We have setup at the 3rd party a URL to our website e.g. "ourweb.com/misc/ReplySMS.aspx". Below is what we have in web.config inside system.web section to route that request to the handler.
<add url="~/misc/ReplySMS.aspx" mappedUrl="~/SMSReplyHandler.ashx" />
Jan 08, 2019 02:42 PM|mgebhard|LINK
Your question is very confusing.... You already have the request object.
And you have control of the response.
If you are asking for access to the third party response to the client request, no you do not have access unless you own the 3rd party software. If you do own the software then you already have access to the Request and Response.