What is Wrong with it ....
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(________________________ URL with STRING ________________________________);
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse(); // Intelisence doesn't show GetResponse()
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
respStreamReader.Close();
Even in Object Window there is no GetResponse() method , but i do get in Windows Form /WPF section !!
Loading

Sunny SharmaPosted Jul 11, 2013, 10:32 AM
See this post, it's nicely explained:
http://stackoverflow.com/questions/5971866/cant-find-httpwebrequest-getresponse-in-wp7-project
Hope it helps.
Abhishek Kumar RaviPosted Jul 11, 2013, 8:30 PM
{
HttpWebRequest myReq=(HttpWebRequest) WebRequest.Create("__________URL______");
myReq.BeginGetResponse(new AsyncCallback(FinishedWebRequest),myReq);
if(_responseString.ToString()=="1")
error=false;
MessageBox.Show(">> SEND() Completed");
}
catch
{
MessageBox.Show("ERROR: Server Busy :(");
}
}
static void FinishedWebRequest(IAsyncResult result)
{
MessageBox.Show(">> Request Sent");
HttpWebResponse response = (HttpWebResponse)(result.AsyncState as HttpWebRequest).EndGetResponse(result);
using (StreamReader sReader = new StreamReader(response.GetResponseStream()))
{
_responseString = sReader.ReadToEnd();
MessageBox.Show(">>Response Accepted");
}
}
_____________________________
Not working , Neither showing any exception nor any error. Just hault the screen .. :(
Sunny SharmaPosted Jul 11, 2013, 2:01 PM
You can modify your code like this: (I have implemented it in console app for demo)
-----------------------------------------------
Hope it helps.
Abhishek Kumar RaviPosted Jul 11, 2013, 10:44 AM
Abhishek Kumar RaviPosted Jul 11, 2013, 10:28 AM
Abhishek Kumar RaviPosted Jul 11, 2013, 8:38 AM
VulpesPosted Jul 11, 2013, 7:53 AM
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(v=vs.95).aspx
Silverlight and Windows Phone programming are not my thing but I'd imagine you have to use the asynchronous BeginGetResponse method instead.
Sunny SharmaPosted Jul 11, 2013, 7:13 AM
I hope you didn't miss addiong a reference to System.Net namespace. Do check the for the dll under references section in Solution Explorer, add it manually if not there and it will work.
Hope it helps.
Cheers!