Guest User

Untitled

a guest
Jul 7th, 2017
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. <%@ WebHandler Language="C#" Class="Test" %>
  2.  
  3. using System;
  4. using System.Web;
  5. using ValueLinkSoftware.AMS.Utils;
  6. using System.Collections.Generic;
  7. using System.IO;
  8. using System.Linq;
  9. using System.Net;
  10. using System.Text;
  11. using System.Data;
  12. using System.Threading;
  13.  
  14. public class Test : IHttpHandler
  15. {
  16.  
  17. public void ProcessRequest(HttpContext context)
  18. {
  19.  
  20. //if (cls_utils.EnableTestEnvironment)
  21. //{
  22. // //for (int i = 0; i < 10; i++)
  23. // //{
  24. // // Thread.Sleep(1000);
  25. // // StringWriter sw = new StringWriter();
  26. // // string assignmentPageURL = context.Request.ApplicationPath + "/AssignAppraisal.aspx?FilterType=RADIUS&ShowWithinRadius=100&ApprID=10913";
  27. // // context.Server.Execute(assignmentPageURL, sw);
  28.  
  29. // // string html = sw.ToString();
  30. // //}
  31. // string loginURL = cls_utils.ApplicationURL + "/Login.aspx";
  32. // string postData = "UserName=amsadmin&Password=dev.123&LoginButton=Login";
  33.  
  34.  
  35. // WebClient webClient = new WebClient();
  36. // webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
  37. // byte[] response = webClient.UploadData(
  38. // loginURL, "POST", Encoding.ASCII.GetBytes(postData)
  39. // );
  40.  
  41. // string responseData = Encoding.ASCII.GetString(response);
  42.  
  43. // responseData = responseData;
  44.  
  45. //}
  46.  
  47. HttpContext.Current.Request.SaveAs(cls_utils.TempFilePath, false);
  48.  
  49.  
  50. }
  51.  
  52. public bool IsReusable
  53. {
  54. get
  55. {
  56. return false;
  57. }
  58. }
  59.  
  60.  
  61.  
  62. }
Add Comment
Please, Sign In to add comment