带有https的xsp4(无法加载私钥)

时间:2018-11-08 07:29:38

标签: asp.net asp.net-mvc mono xsp

我想使用xsp4通过https托管我的asp.net网站。
我从exportet localhost.pfx用this tutorial生成了一个.cer文件和一个.pvk密钥,并试图像这样启动它:

  

xsp4.exe --https --cert =“ localhost.cer” --pkfile =“ localhost.pvk”   --pkpwd = 123456789

在这种尝试下,我收到错误消息:

  

无法加载私钥   'localhost.pvk'。
位于   Mono.WebServer.XSP.SecurityConfiguration.LoadPrivateKeyFile(String   文件名,字符串密码)
位于   Mono.WebServer.XSP.SecurityConfiguration.CheckSecurityContextValidity()
  在Mono.WebServer.XSP.SecurityConfiguration.get_KeyPair()
处   Mono.WebServer.XSP.Server.DebugMain(String [] args,布尔根,   IApplicationHost ext_apphost,布尔值安静)


我尝试对原始.pfx文件执行相同操作:

  

xsp4.exe --https --p12file = localhost.pfx --pkpwd = 123456789

,还将.pfx文件重命名为.p12:

  

xsp4.exe --https --p12file = localhost.p12 --pkpwd = 123456789

但是在所有尝试中,我都会收到此错误消息:

  

无法加载私钥'1571753451.p12'。
  在Mono.WebServer.XSP.SecurityConfiguration.LoadPkcs12File(String   文件名,字符串密码)
位于   Mono.WebServer.XSP.SecurityConfiguration.CheckSecurityContextValidity()
  在Mono.WebServer.XSP.SecurityConfiguration.get_KeyPair()
处   Mono.WebServer.XSP.Server.DebugMain(String [] args,布尔根,   IApplicationHost ext_apphost,布尔值安静)

我还尝试了this Website的演示证书,结果相同。

注意:如果我输入了错误的密码,程序只会说出密码是错误的,因此不应是密码。

我使用最新的Mono安装中的xsp版本0.4.0.0。


如果无法解决此问题,我的目标是使用iis之外的其他主机来托管asp.net网站。
我尝试使用asp.net扩展名尝试使用Apache,但没有使其正常工作。之后,我发现xsp4可以正常工作,但不能与https:/

0 个答案:

没有答案