Skip to content

Commit aeb5ad6

Browse files
committed
Delete auto-generated web.config file with IIS
1 parent b9fc8e8 commit aeb5ad6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/BenchmarksServer/Startup.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,6 +2624,15 @@ void SetAttribute(XDocument doc, string path, string name, string value)
26242624
var fileName = executable + ".apphost.config";
26252625
applicationHostConfig.Save(fileName);
26262626

2627+
// The SDK generates a web.config file on publish, which will conflict with apphost.config
2628+
try
2629+
{
2630+
File.Delete(Path.Combine(publishedFolder, "web.config"));
2631+
}
2632+
catch (Exception)
2633+
{
2634+
}
2635+
26272636
return fileName;
26282637
}
26292638
}

0 commit comments

Comments
 (0)