Dear All,
Here i am using below code to request a url as web request.
try
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); Stream st = resp.GetResponseStream(); StreamReader sr = new StreamReader(st); string buffer = sr.ReadToEnd();sr.Close();
st.Close();
}
catch (Exception Ex){
Response.Write(Ex.Message);
}
when i run the above code in my button press event its giving below error,
The underlying connection was closed: The connection was closed unexpectedly
Please help me out.
I also spoke with my sms API provider. there is no problem from their side.
Quang VoPosted Mar 24, 2009, 2:35 AM