Hi All,
I developed a C# window application (not Web Application as I
need exe file) needs to handle the Proxy Script with URL
Form: 2 text Boxes (one for filling URL, one for filling Proxy
Script string)
One Button: To calculate the time differences between request and
response (i.e. when URL is requested by user
with proxy script
textbox filled)
One Label: To show the calculated time difference.
My Code is given below
private void Calc_Time_For_URL()
{
try
{ //Time of Request
DateTime dt4 = DateTime.Now;
System.Net.HttpWebRequest myReq = (HttpWebRequest)
WebRequest.Create(tbxURL.Text.ToString());
//Proxy Script
if (tbxProxyScript.Text.Length > 0)
{
//I NEED CODE FOR THIS SECTION MEANS HOW TO HANDLE PROXY
SCRIPT WITH URL
}
//GetResponse for this request.
HttpWebResponse response = (HttpWebResponse)myReq.GetResponse();
//Time of Response
DateTime dt5 = DateTime.Now;
lblTimeTaken.Text = Convert.ToString(dt5.Subtract(dt4));
}
catch(System.Exception ex)
{
string message = "Please Enter Url with
http://www or
https://www as
prefix
as per your need\nError returned is :\n " +
ex.Message;
string caption = "Error!!!";
DialogResult result;
MessageBoxButtons buttons = MessageBoxButtons.OK;
result = MessageBox.Show(message,caption,buttons);
}
}
Does any body have idea, Please mail me ASAP if possible, and this is very
urgent issue.
Thanks,
Deepak
(E-Mail Removed)
(E-Mail Removed)
(E-Mail Removed)
+919886735837