CassiniDev網頁主機測試,棒!

Coordinator
Jan 3, 2013 at 10:04 PM
Edited Jan 5, 2013 at 7:40 PM

下載了 https://cassinidev.codeplex.com/releases/view/45828 只要執行就可以馬上執行html, aspx!覺得很好用

CassiniDev.exe /a:C:\ /pm:Specific /p:81

之後到http://localhost:81 就可以看到內容了!

 

http://cassinidev.codeplex.com/wikipage?title=Command%20line%20reference

Coordinator
Jan 5, 2013 at 7:38 PM

找下個可以使用的port

method 1: (找80到9000)

CassiniDev.exe /a:C:\ /pm:Specific /prs:80 /pre:9000

 

method 2: 

static int FreeTcpPort()
{
  TcpListener l = new TcpListener(IPAddress.Loopback, 80);
  l.Start();
  int port = ((IPEndPoint)l.LocalEndpoint).Port;
  l.Stop();
  return port;
}