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
 
Error in web application (not connected)  
by Karlos [kxip at forthnet dot gr]
posted on 2005/12/14

my programm conenct to the remote server via SSL socket. and everything work perfect if the program is Windows application. but if i do the same thing (connect and send data) from Web application i could not not connect to the remote server.
the remote port is 33123 (is this a problem?)

my code:

SecurityOptions options = new SecurityOptions(SecureProtocol.Ssl3);
options.Entity = ConnectionEnd.Client;
options.VerificationType = CredentialVerification.Auto;
options.Verifier = new CertVerifyEventHandler(OnVerify);
options.Flags = SecurityFlags.Default;
options.AllowedAlgorithms = SslAlgorithms.RSA_AES_256_SHA | SslAlgorithms.RSA_AES_128_SHA | SslAlgorithms.RSA_3DES_168_SHA | SslAlgorithms.SECURE_CIPHERS;

sslSocket = new SecureSocket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp, options);

String szIPSelected = ConfigurationSettings.AppSettings["EppServer"].ToString();
String szPort = ConfigurationSettings.AppSettings["EppServerPort"].ToString();
int alPort = int.Parse(szPort);

System.Net.IPAddress remoteIPAddress = System.Net.IPAddress.Parse(szIPSelected);
System.Net.IPEndPoint remoteEndPoint = new System.Net.IPEndPoint(remoteIPAddress, alPort);
sslSocket.Connect(remoteEndPoint);

 

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