How to re-send data from ASP

I was looking for a solution for a long time and finally I got it. The problem originates in need to resend data from an IPN processing script to another script. This is a main problem when integrating e.g. with PayPal. In PHP this is easy, as you can use cURL code. The problem however is with ASP code. It is not possible to use cURL in ASP as you know, so you cannot use this solution in case your IPN script is ASP.

The solution is to use objHttp object in ASP (VB.NET):
Dim objHttp: Set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP"); "POST", "", False;
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded";
objHttp.Send Request.Form;
Or in C#.NET:
string qString = Request.QueryString["pap_custom"];
string url = "" + qString;
HttpWebRequest objHttp = (HttpWebRequest)WebRequest.Create(url);
objHttp.ContentType = "application/x-www-form-urlencoded";
objHttp.Method = "POST";
objHttp.KeepAlive = false;
objHttp.Credentials = System.Net.CredentialCache.DefaultCredentials;
byte[] _byteVersion = Encoding.ASCII.GetBytes(Request.Form.ToString());
Stream requestStream = objHttp.GetRequestStream();
requestStream.Write(_byteVersion, 0, _byteVersion.Length);
The code above will create a POST request in ASP, fill it with data received (Request.Form) and send it to URL defined in second line.
Update: the first code seems to be outdated so here is one more equivalent how to do it in
Imports System
Imports System.IO
Imports System.Net
Using client As New Net.WebClient
   Dim PAPurl As String = ""
   client.UploadValues(PAPurl, "POST", Request.Form)
End Using