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
Abdalla Omran
NA
334
32.4k
Timout exception with HttpWebRequest.GetResponse()
Jul 30 2020 7:32 AM
Hi
I am getting always time out excption with httpwebrequest.GetResponse method .
first i am making a request Post
private
HttpWebRequest CreateRequest();
after that getting the request in a veriable and serialliz to json
and this poinnt "request.GeResponse()" i am getting the exception time out .
i will be very glad for any kind of help .
var request = CreateRequest();
try
{
using
(var streamWriter =
new
StreamWriter(request.GetRequestStream()))
{
var json = JsonConvert.SerializeObject(pagesUrlJson,
new
JsonSerializerSettings
{
ContractResolver =
new
DefaultContractResolver { NamingStrategy =
new
CamelCaseNamingStrategy() }
});
streamWriter.Write(json);
}
using
(var response = request.GetResponse())
{
using
(var resultStream = response.GetResponseStream())
{
var reader =
new
StreamReader(
resultStream ??
throw
new
InvalidOperationException(
"Web response is null"
));
var resultText = reader.ReadToEnd();
//here convert json to C#Object
}
Reply
Answers (
3
)
what is setting and code require for curd operation in asp.net core 3.
The 'Microsoft.ACE.OLEDB.15.0' provider is not registered on the local