TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kumar jane
NA
1
1.6k
Error : The underlying connection was closed.
Feb 15 2013 5:59 AM
Hello
Friends
,
I am sending
5
sms
from
my asp
.
net application
in
c
# at a time using HttpWebRequest. Its running fine but sometimes sms sending fails becoz of this error:
Error
:
The
underlying connection was closed
:
An
unexpected error occurred on a receive
.
Code
for
sending sms
:
I tried webreq
.
KeepAlive
=
true
;
but still it doesn
'
t work
...
------------------------------------------------------------------------------------------------------------------
Page curent = new Page(); string SmsUrl = url + parameter; HttpWebRequest webreq = WebRequest.Create(SmsUrl) as HttpWebRequest; webreq.ContentType = "application/x-www-form-urlencoded";//"text/html; charset=UTF-8"; webreq.Method = "POST"; byte[] bytes = Encoding.ASCII.GetBytes(parameter); webreq.Timeout = 10000000; webreq.KeepAlive = true; Stream os = null;
WebResponse webresponce = webreq.GetResponse();
if (webresponce == null)
{
return null;
}
StreamReader sr = new StreamReader(webresponce.GetResponseStream());
res = sr.ReadToEnd();
Console.WriteLine(res);
return res;
---------------------------------------------------------------------------------------------------------------------
Please
advice something
...
Reply
Answers (
1
)
convert the binary format file into excel file format
Nested Gridview by using Dynamicaly