-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: jack313in
Message 1 in Discussion
Hi All,
I am getting an unexepected exception on remoting in Framework 2. The Context
was , On Server side i have a singleton ton remote object, and the same is
consumed by a .net client and i am calling the client exe multiple times from
a batch file. The result is its raising an exception some time in the very
begining , some time after few service invocation or some time very last. The
Exception is some what weired...
System.IO.IOException occurred
Message="The read operation failed, see inner exception."
Source="System"
Inner Exception {"A non-blocking socket operation could not be completed
immediately"}
Native Error Code - 10035
Socket Error Code - System.Net.Sockets.SocketError.WouldBlock
StackTrace:
Server stack trace:
at System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.Read(Byte[] buffer, Int32 offset,
Int32 count)
at System.Runtime.Remoting.Channels.SocketHandler.ReadFromSocket(Byte[]
buffer, Int32 offset, Int32 count)
at System.Runtime.Remoting.Channels.SocketHandler.BufferMoreData()
at System.Runtime.Remoting.Channels.SocketHandler.Read(Byte[] buffer,
Int32 offset, Int32 count)
at
System.Runtime.Remoting.Channels.Tcp.TcpFixedLengthReadingStream.Read(Byte[]
buffer, Int32 offset, Int32 count)
at System.IO.BinaryReader.ReadBytes(Int32 count)
at
System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Read(__BinaryParser
input)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadSerializationHeaderRecord()
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler
handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler, Boolean fCheck, Boolean
isCrossAppDomain, IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.UnsafeDeserialize(Stream
serializationStream, HeaderHandler handler)
at
System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String
objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel
securityLevel)
at
System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream
requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders,
Stream& responseStream)
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 shared.communication.interfaces.I_CSCOM.GetServerResponse(Transport
Transport)
at client.serverio.proxy.RemotingProxy.GetServerResponse(Transport
Transport)
Please see the code listing
Server
BinaryServerFormatterSinkProvider objBinaryServerFormatterSinkProvider = new
BinaryServerFormatterSinkProvider();
objBinaryServerFormatterSinkProvider.TypeFilterLevel =TypeFilterLevel.Full;
m_objTcpServerChannel = new
TcpServerChannel("MyServer",8080,objBinaryServerFormatterSinkProvider);
ChannelServices.RegisterChannel(m_objTcpServerChannel,true );
m_objTCPServer.RegisterInterface(typeof(ServiceBus),"MyServiceBus");
m_objTcpServerChannel.StartListening(null);
Client
m_objTcpClientChannel = new TcpClientChannel("", new
BinaryClientFormatterSinkProvider());
ChannelServices.RegisterChannel(m_objTcpClientChannel,true );
I_XAL m_objXAL = (I_XAL)
Activator.GetObject(InterfaceType,"tcp://localhost:8080/MyServiceBus");
objKPITemplateDefinition =
(KPITemplateDefinition)XAL.SaveObject(objKPITemplateDefinition,"TestLoader",true);
The Other intresting fact is that the same is code is workign fine on Framework
1.1
If any body can direct me what wrong in this.
Cheers!!!
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]