X509Chain error

I downloaded VIsual C# Express 2005 and tried the SslStream class but i received this error declaring theCertificateValidationCallback:

error CS0426: The type name 'X509Chain' does not exist in the type 'System.Security.Cryptography.X509Certificates.X509Certificate'

and this is the line of code i wrote:

staticbool CertificateValidationCallback(object sender,X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain,SslPolicyErrors sslPolicyErrors)

1) What did i do wrong?

2) There's a way to connect to a ssl server without worrying about authentication? I mean.... i don't need to check the certificate of the server. i simply want to establish the communication

Thanks in advance for your help

[1135 byte] By [luca82] at [2008-2-1]
# 1
For all those who are interested:

1) I forgot to reference System.Security

2) To simply get the connection use this callback:

static bool CertificateValidationCallback(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)

{

return true;

}

Sorry for those 2 question (since i answered them myself... LoL)

luca82 at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...

.NET Development

Site Classified