Skip to content

Commit

Permalink
Fix IIS runs (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym committed Jul 11, 2018
1 parent e4ca87c commit 06f8701
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/BenchmarksServer/Startup.cs
Expand Up @@ -1647,15 +1647,7 @@ private static async Task<Process> StartProcess(string hostname, string benchmar
arguments += $" --threadCount {job.KestrelThreadCount.Value}";
}

if (iis)
{
Log.WriteLine($"Generating application host config for '{executable} {arguments}'");

var apphost = GenerateApplicationHostConfig(job, "published", executable, arguments, hostname);
arguments = $"-h \"{apphost}\"";
executable = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), @"System32\inetsrv\w3wp.exe");
}
else
if (!iis)
{
arguments += $" --server.urls {serverUrl}";
}
Expand All @@ -1667,6 +1659,15 @@ private static async Task<Process> StartProcess(string hostname, string benchmar
commandLine += $" {arguments}";
}

if (iis)
{
Log.WriteLine($"Generating application host config for '{executable} {commandLine}'");

var apphost = GenerateApplicationHostConfig(job, "published", executable, commandLine, hostname);
commandLine = $"-h \"{apphost}\"";
executable = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), @"System32\inetsrv\w3wp.exe");
}

Log.WriteLine($"Invoking executable: {executable}, with arguments: {commandLine}");

var process = new Process()
Expand Down

0 comments on commit 06f8701

Please sign in to comment.