public IisExpress(string path, int port)
{
if (!Directory.Exists(path))
{
throw new DirectoryNotFoundException();
}
if (ushort.MinValue > port || ushort.MaxValue < port)
{
throw new ArgumentOutOfRangeException("port");
}
Path = path;
Port = port;
_startInfo = new ProcessStartInfo
{
FileName = IisExpressPath,
Arguments = string.Format("/path:{0} /port:{1}", path, port),
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false
};
}