System.Net.WebException: The operation has timed out
- From: "DBC User" <dbcuser@xxxxxxxxx>
- Date: 30 Jan 2007 12:16:21 -0800
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");
}
}
.
- Prev by Date: RE: use xsd.exe and wsdl.exe to go from XML to web service interface ?
- Next by Date: RE: Server Error in '/' Application :'(
- Previous by thread: RE: use xsd.exe and wsdl.exe to go from XML to web service interface ?
- Next by thread: Timeout when using VS 2005-generated proxies to access WCF web ser
- Index(es):
Relevant Pages
|
Loading