Making the path to app relative for Azure

Removing startupLimitType - it is obsolete in AspNetCoreModule

Addresses #142
This commit is contained in:
moozzyk 2016-04-21 16:31:22 -07:00
parent f12932405d
commit b034849756
2 changed files with 6 additions and 7 deletions

View File

@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.Tools
{
// Forward slashes currently work neither in AspNetCoreModule nor in dotnet so they need to be
// replaced with backwards slashes when the application is published on a non-Windows machine
var appPath = Path.Combine(configureForAzure ? @"%home%\site" : ".", appName).Replace("/", "\\");
var appPath = Path.Combine(".", appName).Replace("/", "\\");
var logPath = Path.Combine(configureForAzure ? @"\\?\%home%\LogFiles" : @".\logs", "stdout").Replace("/", "\\");
if (!isPortable)
@ -83,7 +83,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.Tools
SetAttributeValueIfEmpty(aspNetCoreElement, "stdoutLogEnabled", "false");
SetAttributeValueIfEmpty(aspNetCoreElement, "stdoutLogFile", logPath);
SetAttributeValueIfEmpty(aspNetCoreElement, "startupTimeLimit", "3600");
}
private static XElement GetOrCreateChild(XElement parent, string childName)

View File

@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.Tools.Tests
<handlers>
<add name=""aspNetCore"" path=""*"" verb=""*"" modules=""AspNetCoreModule"" resourceType=""Unspecified""/>
</handlers>
<aspNetCore processPath="".\test.exe"" stdoutLogEnabled=""false"" stdoutLogFile="".\logs\stdout"" startupTimeLimit=""3600""/>
<aspNetCore processPath="".\test.exe"" stdoutLogEnabled=""false"" stdoutLogFile="".\logs\stdout"" />
</system.webServer>
</configuration>");
@ -168,8 +168,8 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.Tools.Tests
aspNetCoreElement.Elements().Remove();
Assert.True(XNode.DeepEquals(
XDocument.Parse(@"<aspNetCore processPath=""%home%\site\test.exe"" stdoutLogEnabled=""false""
stdoutLogFile=""\\?\%home%\LogFiles\stdout"" startupTimeLimit=""3600""/>").Root,
XDocument.Parse(@"<aspNetCore processPath="".\test.exe"" stdoutLogEnabled=""false""
stdoutLogFile=""\\?\%home%\LogFiles\stdout"" />").Root,
aspNetCoreElement));
}
@ -182,7 +182,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.Tools.Tests
Assert.True(XNode.DeepEquals(
XDocument.Parse(@"<aspNetCore processPath=""dotnet"" arguments="".\test.exe"" stdoutLogEnabled=""false""
stdoutLogFile="".\logs\stdout"" startupTimeLimit=""3600""/>").Root,
stdoutLogFile="".\logs\stdout"" />").Root,
aspNetCoreElement));
}
@ -198,7 +198,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.Tools.Tests
Assert.True(XNode.DeepEquals(
XDocument.Parse(@"<aspNetCore processPath=""dotnet"" arguments="".\test.exe"" stdoutLogEnabled=""false""
stdoutLogFile="".\logs\stdout"" startupTimeLimit=""3600""/>").Root,
stdoutLogFile="".\logs\stdout"" />").Root,
aspNetCoreElement));
}