我想Reserve the port
和port binding
通過編程用下面的代碼:無法在Win XP機器上運行netsh命令
private void PortReserve()
{
try
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new
System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
startInfo.FileName = "cmd.exe";
startInfo.UseShellExecute = true;
startInfo.Arguments = @"/c netsh http add urlacl url=https://127.0.0.1:8083/ user=EVERYONE";
process.StartInfo = startInfo;
process.Start();
}
catch (Exception ex)
{
throw ex;
}}
進行端口綁定: 與@"/c netsh http add sslcert ipport=127.0.0.1:8083 certhash=df03c4b0b32f3302a3b70abe6b5dfd864d0986a5 appid={00112233-4455-6677-8899-CCBBCCDDEEFF} clientcertnegotiation=enable";
以上替換的startInfo.Arguments
參數命令在win 7
,win servers
和8
機器中完美工作,但是當涉及到Win xp
它開始在CMD
中輸入錯誤: The following command was not found http add urlacl url=https://127.0.0.1:8083 user=Everyone
我檢查了所有machine
中mmc
成功導入的證書。
在這種情況下我該怎麼辦?