Solved

Operation Time Out during the execution of the web request.

Posted on 2012-03-22
5
404 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

689 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