Hi!
I am using Fez Cobra.
I am trying to setup WWW server working with SSL support.
My code is:
HttpListener listener = new HttpListener("https");
byte[] bCert = Resource.GetBytes(Resource.BinaryResources.cert);
X509Certificate cert = new X509Certificate(bCert);
listener.HttpsCert = cert;
listener.Start();
HttpListenerContext ctx;
while (true)
{
ctx = listener.GetContext();
try
{
new RequestProcess(ctx);
}
catch (Exception ex)
{
Debug.Print(ex.Message);
}
}
But it does not work. I’ve got exception:
#### Exception System.NotSupportedException - CLR_E_NOT_SUPPORTED (6) ####
#### Message:
#### Microsoft.SPOT.Net.Security.SslNative::SecureServerInit [IP: 0000] ####
#### Microsoft.SPOT.Net.Security.SslStream::Authenticate [IP: 0037] ####
#### Microsoft.SPOT.Net.Security.SslStream::AuthenticateAsServer [IP: 000d] ####
#### Microsoft.SPOT.Net.Security.SslStream::AuthenticateAsServer [IP: 000a] ####
#### System.Net.HttpListener::AcceptThreadFunc [IP: 0072] ####
A first chance exception of type 'System.NotSupportedException' occurred in Microsoft.SPOT.Net.Security.dll
A first chance exception of type 'System.NotSupportedException' occurred in System.Net.Security.dll
An unhandled exception of type 'System.NotSupportedException' occurred in System.Net.Security.dll
Http works great.
So what is wrong?
Regards,
Jacek