Operation Time Out during the execution of the web request.

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
dotsandcomsAsked:
Who is Participating?
 
dotsandcomsConnect With a Mentor Author Commented:
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
 
gery128Commented:
You might want to try increasing Timeout of WebRequest.

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

Open in new window

0
 
gery128Commented:
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
 
dotsandcomsAuthor Commented:
Hi,
I've increases timeout and added .close() but cannot resolve the error. Is there any hosting   side issues ?
0
 
dotsandcomsAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.