Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何使用https创建HttpListener_C#_.net_Http_Ssl_Https - Fatal编程技术网

C# 如何使用https创建HttpListener

C# 如何使用https创建HttpListener,c#,.net,http,ssl,https,C#,.net,Http,Ssl,Https,我正在使用.NET设计一个http服务器。 现在,我想让它成为一个https服务器。 我基本上使用HttpListener从客户端获取http请求。 我知道如何创建SSL证书。 但是如何配置HttpListener以使用该SSL证书呢?只需使用https前缀(例如https://*:8443)。然后将证书绑定到此端口 见答案Walter Kelt: 你看到右边的第一个了吗?

我正在使用.NET设计一个http服务器。 现在,我想让它成为一个https服务器。 我基本上使用HttpListener从客户端获取http请求。 我知道如何创建SSL证书。 但是如何配置HttpListener以使用该SSL证书呢?

只需使用https前缀(例如https://*:8443)。然后将证书绑定到此端口

见答案Walter Kelt:

你看到右边的第一个了吗?