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
Alex Ivv
NA
1
895
request to http-server
Jul 28 2015 10:12 AM
Hi!
I have one question -
when send request to http-server:
HttpWebRequest req = ( HttpWebRequest )WebRequest.Create( recordingUrl );
req.Method = "GET";
req.Credentials = credentialCache;
resp = req.GetResponse();
stream = resp.GetResponseStream();
If after some time, we must once again make a request not related to the previous one, as actually to do?
Dispose
the current?
stream.Close();
stream.Dispose();
resp.Close();
resp.Dispose()
A
nd then all over again?
The server after a few quick successive query throws "503 Service Unavailable". It seems that he does not kill quickly old connects and falls off on exceeding the number of connections.
They said that it is necessary to use the old connection. But how? The new recordingUrl - new WebRequest.Create(), which obviously creates a new HttpWebRequest object, new connection.
Reply
Answers (
1
)
Asp.net web service return json
Loading SSL certificate from file in a WEBAPI2 service