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");
}
}