Solved

Operation Time Out during the execution of the web request.

Posted on 2012-03-22
5
400 Views
Last Modified: 2012-08-13
Hello Experts,
I have created a script for currency conversion which convert currency of the website to USD or Euro from base currency GBP.
I have used http://www.google.com/ig for currency conversion.
This script runs perfectly on my Local server and also on test server  : http://dotcompreview.com/website1/default2.aspx 
but gives error on live server : http://thats-the-look.com/default2.aspx.

Can you please suggest what changes i need to make to run script on the live server.

I have attached my .cs file and Error Screen.
Default2.aspx.cs.txt
error.jpg
0
Comment
Question by:dotsandcoms
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:gery128
ID: 37753173
You might want to try increasing Timeout of WebRequest.

webRequest.Timeout = 20000; //instead of
webRequest.Timeout = 10000;

Open in new window

0
 
LVL 9

Expert Comment

by:gery128
ID: 37753181
Also once you are done with use of response object. you should close/dispose it.
Check this link:

http://stackoverflow.com/questions/1215488/system-net-webexception-the-operation-has-timed-out
0
 

Author Comment

by:dotsandcoms
ID: 37755786
Hi,
I've increases timeout and added .close() but cannot resolve the error. Is there any hosting   side issues ?
0
 

Accepted Solution

by:
dotsandcoms earned 0 total points
ID: 37755877
Hi,
There is issue with Hosting Service. I took help from Microsoft KB [http://support.microsoft.com/kb/318140].
Then did proper settings in Web.Config and now its work perfectly.

thank you for your help.
0
 

Author Closing Comment

by:dotsandcoms
ID: 37770469
There is issue with Hosting Service. I took help from Microsoft KB [http://support.microsoft.com/kb/318140].
Then did proper settings in Web.Config and now its work perfectly.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question