News  [SoftwareSite

Latest News
Older News
RSS Feed
 
Complete Projects
Useful Classes
Top Downloads
Message Board
AllAPI.net
 
Send Comments
Software License
Mentalis.org Buttons
Donate
 
Forums -> Security Library Forum
 
Socket Exception  
by Priya [priya at pivotsolutions dot com]
posted on 2004/12/28

Sometimes when I call Socket.BeginSend I get the following exception and the socket is automatically closed..Please help if you have any ideas..

"Not enough storage is available to process this command"
ErrorCode 8 int
_COMPlusExceptionCode -532459699 int
- System.ComponentModel.Win32Exception {System.Net.Sockets.SocketException} System.ComponentModel.Win32Exception
- System.Runtime.InteropServices.ExternalException {System.Net.Sockets.SocketException} System.Runtime.InteropServices.ExternalException


by Pieter Philippaerts [Pieter at mentalis dot org]
posted on 2004/12/30

That's a weird exception... Do you happen to have a more complete stack trace? [ie, which line in BeginSend causes the error]

by Priya [priya at pivotsolutions dot com]
posted on 2005/01/04

Basically I am in the process of getting data from SSLServerSocket and I try to send some data to the SSLServerSocket by calling the BeginSend Method and the beginSend Method figures out the socket is closed and throws this exception.This does not happen every time and is a random event. This is pretty serious as socket is closed randomly.

Securesocket.cs Line 347

by Pieter Philippaerts [Pieter at mentalis dot org]
posted on 2005/01/04

And can you post (some of) the code that causes this problem? How do you initialize the (C# and Java) sockets, etc? I can't do much if I have nothing to work with.

by Priya [priyakrish143 at hotmail dot com]
posted on 2005/01/05

Thats the code for initializing the socket on c# side..
SecurityOptions options = new SecurityOptions(SecureProtocol.Ssl3,null,ConnectionEnd.Client,
CredentialVerification.None,null,null,SecurityFlags.Default,SslAlgorithms.SECURE_CIPHERS,
null);

IPHostEntry ipHost = Dns.Resolve(this._host);
IPAddress ipAddr = ipHost.AddressList[0];
_endPoint = new IPEndPoint(ipAddr,_port);
_socket = new SecureSocket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp,options);

This is the code for sending data(xml) to the sslsocketserver

this._out = Encoding.ASCII.GetBytes(message);
_socket.BeginSend(this._out,0,this._out.Length,SocketFlags.None,new AsyncCallback(SendCallback),_socket);


On Java SSLServerSocket side

SSLServerSocketFactory sslServerSocketFactory = (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();

sslServerSocket = (SSLServerSocket)sslServerSocketFactory.createServerSocket(PORT, 25);

sslSocket = (SSLSocket)sslServerSocket.accept();



… Socket writer and reader for session:



sslSocket.getOutputStream();

sslSocket.getInputStream();

Let me know if u need anything else..


 

Copyright © 2002-2007, The Mentalis.org Team. All rights reserved.
This site is located at http://www.mentalis.org/
Send comments to the webmaster.