473,403 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

System.Net.WebException: The operation has timed out

Hi,

I have a web client code written in C# and I am using web services
using the proxy created by VS2005. Only timeout I am using this case
is the SOAP envelop timeout. When I run the code it is keeping timing
out. Could someone tell me what could be the reasons? [One side note a
new server is added to the pool and this code didn't change for couple
of months and its been working properly till a week ago, there is
nothing changed during that week though]. Here is the code snippet
that is failing

private void CIn()
{
taskComplete = false;

ServiceWse wse = new ServiceWse();
wse.UseDefaultCredentials = false;
SoapContext ctx = wse.RequestSoapContext;
ctx.Security.Tokens.Add(token);
ctx.Security.Elements.Add(new MessageSignature(token));
ctx.Security.Timestamp.TtlInSeconds = _Timeout;
AppSettingsReader config = new AppSettingsReader();
Uri dest = new
Uri(config.GetValue(ReferenceNames.WebServiceURI,
typeof(string)).ToString());
Uri via = new Uri(config.GetValue(WSELocation(),
typeof(string)).ToString());
ctx.Addressing.Destination = new EndpointReference(dest,
via);

byte[] fileContents = File.ReadAllBytes(aDirectory =
zFileName);
try
{
wse.CIn(a, y, t, x, R, fileContents);
taskComplete = true;
}
catch (System.Web.Services.Protocols.SoapException e1)
{
log.Fatal(" failed " + e1.ToString());
}
catch (Exception e1)
{
log.Fatal(" failed " + e1.ToString());
}
}
else
{
log.Fatal("Unable to file");
}
}

Jan 30 '07 #1
0 3031

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joe Bloggs | last post by:
I have a C# MRS application that uses the ReportingService's Render method to retrieve a byte array containing a report. The following error message occurs An unhandled exception of type...
0
by: yariv | last post by:
Hello All, I am having a very strange problem. while trying to access http page on the web. I happen to have some problems at specific machines. the exception I get is: *************...
5
by: Sachin Surana | last post by:
We use HttpWebRequest to send the request at a URL. But some times the method GetResponse throws a time out exception. But when we check the IIS logs, there is no such entry. So the request never...
1
by: etantonio | last post by:
Good morning, I've a problem, in the past I translate my site from google or altavista with a code similar to this : <%@ Page Language="c#" Trace="true" Debug="true" %> <%@ import...
4
by: Joe | last post by:
I'm hosting my web service on a Windows 2003 box which is remotely located. When trying to add a web reference to a C# project I get an error message 'There was an error downloading...
2
by: tlan | last post by:
Hi, I got this error when I move my web service to Windows2003 server. I spent hours scouting on the internet and could find any answer. Please help!!! I the webservice is timeout between 1...
4
by: arun.hallan | last post by:
I know this has been asked umpteen times but i cant find an answer to my problem. Very simply, i have a GUI which is trying to call a webservice. The webservice may take any time from 5mins to...
3
by: srini | last post by:
I have a console application in C#, which calls a .net webservice. The .net webservice calls a stored procedure to retrieve the data. The sp runs for around 3 minutes and get the results. The first...
0
by: PoonamS | last post by:
Hi, I created WCF "Hello world" application. everything works fine. but when i try to run the client website. It gives me WebException. it shows me that "Operation has timed out". i tried the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.