Why is it or what could be done to solve the following problem.  I created
a windows service that holds an object in memory.  All this object does is
raises events to the clients who remote to it when a client calls a
funtion (ie: a client executes the Add function and that raises the OnAdd
event).  If I force an error in the Add function (Dim D as date =
ctype("dd", date)) then every now and then (1 out of 20 tries or so) the
client that forces the error will freeze up and then show this message (it
doesn't get caught by the try....catch of the caller either) and all other
clients will follow suit...even on methods that don't raise an error.  My
guess is that the error is causing the object to be disposed but I'm not
sure.  As of now, all objects are on the same machine but that will change
shortly (The service will run on a middle-tier machine and of course the
clients will be on seperate machines).  IDEAS????  Am I suppose to do
something special for exceptions in remoted objects?   The lease is set to
never expire.



    Public Overrides Function InitializeLifetimeService() As Object
        Return Nothing
    End Function





See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Net.WebException: The underlying connection was closed: Unable to
connect to the remote server.

Server stack trace:
   at System.Net.HttpWebRequest.CheckFinalStatus()
   at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult
asyncResult)
   at System.Net.HttpWebRequest.GetRequestStream()
   at
System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessAndSend(IMessage
msg, ITransportHeaders headers, Stream inputStream)
   at
System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
   at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage
msg)

Exception rethrown at [0]:
   at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
   at ServerObject.EventDeleteShim.Shimmer(Int32 ID)
   at ServerObject.DeleteCallBack.Invoke(Int32 ID)
   at ServerObject.SomeObject.Delete(Int32 ID)
   at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase
mb, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
   at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [1]:
   at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
   at ServerObject.iCatolog.Delete(Int32 ID)
   at TestServerEvents.Form1.Button2_Click(Object sender, EventArgs e) in
C:\Data\Visual Studio Projects\TestServerEvents\Form1.vb:line 127
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs 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.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)


===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to