Solved

Operation Time Out during the execution of the web request.

Posted on 2012-03-22
5
396 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now