473,320 Members | 2,124 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,320 software developers and data experts.

Webservices fails on every other call .Net 2.0

I have a .net webservice (located in a different machine) that is called
twice from a windows form .net application.

The ws works fine if I called only one call, but failed if I called them
both, one after another. The following error occurs every time I called the
second web service:
System.Net.WebException was unhandled
Message="The underlying connection was closed: A connection that was
expected to be kept alive was closed by the server."
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.WebClientProtocol.Ge tWebResponse(WebRequest
request)
at
System.Web.Services.Protocols.HttpWebClientProtoco l.GetWebResponse(WebRequest
request)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at
WF_BCCR.cr.fi.bccr.indicadoreseconomicos.wsIndicad oresEconomicos.ObtenerIndicadoresEconomicosXML(Str ing
tcIndicador, String tcFechaInicio, String tcFechaFinal, String tcNombre,
String tnSubNiveles) in C:\Desarrollo\Visual Studio
2005\Projects\WF_BCCR\WF_BCCR\Web
References\cr.fi.bccr.indicadoreseconomicos\Refere nce.cs:line 121
at WF_BCCR.Form1.button1_Click(Object sender, EventArgs e) in
C:\Desarrollo\Visual Studio 2005\Projects\WF_BCCR\WF_BCCR\Form1.cs:line 45
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WF_BCCR.Program.Main() in C:\Desarrollo\Visual Studio
2005\Projects\WF_BCCR\WF_BCCR\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Code:

cr.fi.bccr.indicadoreseconomicos.wsIndicadoresEcon omicos wsCompra = new
wsIndicadoresEconomicos();
cr.fi.bccr.indicadoreseconomicos.wsIndicadoresEcon omicos wsVenta = new
wsIndicadoresEconomicos();
XmlDocument xmlVenta = new XmlDocument();
XmlDocument xmlCompra = new XmlDocument();

// Obtenga el dÃ*a de hoy
DateTime fecha = DateTime.Today;
int fechaAnno = fecha.Year;
int fechaMes = fecha.Month;
int fechaDia = fecha.Day;
String fechaString = fechaDia + "/" + fechaMes + "/" + fechaAnno;

String compra = wsCompra.ObtenerIndicadoresEconomicosXML("317",
fechaString, fechaString, "Grupo Nación GN S.A.", "N");
String venta = wsVenta.ObtenerIndicadoresEconomicosXML("318",
fechaString, fechaString, "GN Grupo Nación SA", "N");

// Cargue la información a estructuras XML
xmlCompra.LoadXml(compra);
xmlVenta.LoadXml(venta);

MessageBox.Show(xmlCompra.InnerXml.ToString());
MessageBox.Show(xmlVenta.InnerXml.ToString());

Webservice:
http://indicadoreseconomicos.bccr.fi...tnSubNiveles=N

Thank,

Lorenzo Jiménez
Dec 12 '05 #1
2 3966

I am with the same problema and I didnt find a solution for this
problem. What is the solution to solve the problem?

Thanks,
Kiguti

Lorenzo wrote:
[b]I have a .net webservice (located in a different machine) that is
called
twice from a windows form .net application.

The ws works fine if I called only one call, but failed if I called
them
both, one after another. The following error occurs every time I
called the
second web service:
System.Net.WebException was unhandled
Message="The underlying connection was closed: A connection that was
expected to be kept alive was closed by the server."


--
rkiguti
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message2021984.html

Sep 29 '06 #2
"Check" the Keep alive option on IIS settings. should resolve this issue.

"rkiguti" <rk************@mail.mcse.mswrote in message
news:rk************@mail.mcse.ms...
>
I am with the same problema and I didnt find a solution for this
problem. What is the solution to solve the problem?

Thanks,
Kiguti

Lorenzo wrote:
>[b]I have a .net webservice (located in a different machine) that is
called
twice from a windows form .net application.

The ws works fine if I called only one call, but failed if I called
them
both, one after another. The following error occurs every time I
called the
second web service:
System.Net.WebException was unhandled
Message="The underlying connection was closed: A connection that was
expected to be kept alive was closed by the server."

--
rkiguti
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message2021984.html

Oct 2 '06 #3

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

Similar topics

3
by: jasonkester | last post by:
Just a heads up for anybody that comes across this in the future. Noticed a strange behavior in RegExp.test() today. Check out the following code. It will alternately display "chokes" and null,...
3
by: | last post by:
Hi, I have an unmanaged VC7 app calling a C# dotnet service. I'm using the VS2003 generated proxy class derived from CSoapSocketClientT. The client app works fine for most of my customers, but...
8
by: Allan Ebdrup | last post by:
I just had a discussion with one of my fellow programmers. We have a class for doing some logging and sending an email, it has 5 different scenarioes of loggin that are common enough to share a...
9
by: Bruce Hodge | last post by:
Hi, We have a couple of clients who are having trouble connecting to .Net webservices, (they're coming from PHP and VFP). We were looking to provide a diagonostic tool that displayed the soap...
1
by: Bamse | last post by:
Hi, can timers be used in webservices? as an example: to check at some time interval an object - Application and for each logged user, check its login period, and if it is greater than 30...
0
by: Abhimanyu Sirohi | last post by:
Hi All, I am very much confused about when to use WebServices. I don't see WebServices as a good choice because a new instance is created on every method call. Is a WebService capable of handling...
6
by: sameer | last post by:
..NET Framework 1.1 VS2003 Application is making webservice calls from behind a proxy server and then freezes and dies. Questoin is can i use webservice over proxy server( i guess another name...
10
by: smarty | last post by:
Hi, I have written a WSE in vis studio 2005 as and produced a dll that I can use in other projects by including the following in the web.config. <webservices> <soapextensiontypes> <add...
0
by: =?Utf-8?B?RmFiaWFuIEFuZGVyc29u?= | last post by:
Hi WS Developers, I have am working on an integration project in which we are using WSDL and MS XML WebServices to integrate legacy systems other with external systems. Unfortunately, we must...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.