2
다음 http 핸들러에서 "byte [] param = [...]"오류가 발생합니다. 다른 ashx 파일이 작동 중입니다. 처리되지 않은 예외가 현재 웹 요청을 실행하는 동안 발생했습니다 당신이 더 많은 정보를 필요로하는 경우ashx 오류 http 핸들러 2
요청
설명이 컨텍스트에서 사용할 수 없습니다 ... 말해. 오류 및 코드에서 시작된 위치에 대한 자세한 정보는 스택 추적을 검토하십시오.
예외 정보 : System.Web.HttpException : 요청이 컨텍스트
public class Handler1 : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
//Post back to either sandbox or live
string strSandbox = "https://www.sandbox.paypal.com/cgi-bin/webscr";
string strLive = "https://www.paypal.com/cgi-bin/webscr";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox);
//Set values for the request back
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
System.Web.UI.Page pa = new System.Web.UI.Page();
//HERE>HERE>HERE>HERE>
byte[] param = pa.Request.BinaryRead(HttpContext.Current.Request.ContentLength);
string strRequest = Encoding.ASCII.GetString(param);
strRequest += "&cmd=_notify-validate";
req.ContentLength = strRequest.Length;