Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ WebHandler Language="C#" Class="Test" %>
- using System;
- using System.Web;
- using ValueLinkSoftware.AMS.Utils;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Text;
- using System.Data;
- using System.Threading;
- public class Test : IHttpHandler
- {
- public void ProcessRequest(HttpContext context)
- {
- //if (cls_utils.EnableTestEnvironment)
- //{
- // //for (int i = 0; i < 10; i++)
- // //{
- // // Thread.Sleep(1000);
- // // StringWriter sw = new StringWriter();
- // // string assignmentPageURL = context.Request.ApplicationPath + "/AssignAppraisal.aspx?FilterType=RADIUS&ShowWithinRadius=100&ApprID=10913";
- // // context.Server.Execute(assignmentPageURL, sw);
- // // string html = sw.ToString();
- // //}
- // string loginURL = cls_utils.ApplicationURL + "/Login.aspx";
- // string postData = "UserName=amsadmin&Password=dev.123&LoginButton=Login";
- // WebClient webClient = new WebClient();
- // webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
- // byte[] response = webClient.UploadData(
- // loginURL, "POST", Encoding.ASCII.GetBytes(postData)
- // );
- // string responseData = Encoding.ASCII.GetString(response);
- // responseData = responseData;
- //}
- HttpContext.Current.Request.SaveAs(cls_utils.TempFilePath, false);
- }
- public bool IsReusable
- {
- get
- {
- return false;
- }
- }
- }
Add Comment
Please, Sign In to add comment