public static string InProcessThreadException(IISDeploymentResult deploymentResult, string reason) { return($"Application '/LM/W3SVC/1/ROOT' with physical root '{EscapedContentRoot(deploymentResult)}' hit unexpected managed exception{reason}"); }
public static string ShutdownFileChange(IISDeploymentResult deploymentResult) { return($"Application '{EscapedContentRoot(deploymentResult)}' was recycled after detecting file change in application directory."); }
public static string InProcessFailedToStop(IISDeploymentResult deploymentResult, string reason) { return("Failed to gracefully shutdown application 'MACHINE/WEBROOT/APPHOST/.*?'."); }
private Task AssertSiteFailsToStartWithInProcessStaticContent(IISDeploymentResult deploymentResult) { return(AssertSiteFailsToStartWithInProcessStaticContent(deploymentResult, "500.0")); }
public static string InProcessFailedToStart(IISDeploymentResult deploymentResult, string reason) { return($"Application '/LM/W3SVC/1/ROOT' with physical root '{EscapedContentRoot(deploymentResult)}' failed to load clr and managed application. {reason}"); }
public static string InProcessHostfxrUnableToLoad(IISDeploymentResult deploymentResult) { return($"Unable to load '(.*)'. This might be caused by a bitness mismatch between IIS application pool and published application."); }
private void AssertFrebLogs(IISDeploymentResult result, params FrebLogItem[] expectedFrebEvents) { AssertFrebLogs(result, (IEnumerable <FrebLogItem>)expectedFrebEvents); }
public static string InProcessFailedToFindRequestHandler(IISDeploymentResult deploymentResult) { return("Could not find the assembly '(.*)' referenced for the in-process application. Please confirm the Microsoft.AspNetCore.Server.IIS package is referenced in your application."); }
private async Task AssertAppOffline(IISDeploymentResult deploymentResult, string expectedResponse = "The app is offline.") { var response = await deploymentResult.HttpClient.RetryRequestAsync("HelloWorld", r => r.StatusCode == HttpStatusCode.ServiceUnavailable); Assert.Equal(expectedResponse, await response.Content.ReadAsStringAsync()); }
public static string OutOfProcessFailedToStart(IISDeploymentResult deploymentResult) { return($"Application '/LM/W3SVC/1/ROOT' with physical root '{EscapedContentRoot(deploymentResult)}' failed to start process with " + $"commandline '(.*)' with multiple retries. " + $"The last try of listening port is '(.*)'. See previous warnings for details."); }
public static string InProcessFailedToFindNativeDependencies(IISDeploymentResult deploymentResult) { return("Invoking hostfxr to find the inprocess request handler failed without finding any native dependencies. " + "This most likely means the app is misconfigured, please check the versions of Microsoft.NetCore.App and Microsoft.AspNetCore.App that " + "are targeted by the application and are installed on the machine."); }
public static string ConfigurationLoadError(IISDeploymentResult deploymentResult, string reason) { return($"Could not load configuration. Exception message: {reason}"); }
public static string InProcessThreadExitStdOut(IISDeploymentResult deploymentResult, string code, string output) { return($"Application '/LM/W3SVC/1/ROOT' with physical root '{EscapedContentRoot(deploymentResult)}' hit unexpected managed background thread exit, exit code = '{code}'. Last 4KB characters of captured stdout and stderr logs:\r\n{output}"); }
public static string InProcessThreadExit(IISDeploymentResult deploymentResult, string code) { return($"Application '/LM/W3SVC/1/ROOT' with physical root '{EscapedContentRoot(deploymentResult)}' hit unexpected managed background thread exit, exit code = '{code}'."); }
public static string FailedToStartApplication(IISDeploymentResult deploymentResult, string code) { return($"Failed to start application '/LM/W3SVC/1/ROOT', ErrorCode '{code}'."); }
public string GetLogFileContent(IISDeploymentResult deploymentResult) { return(Helpers.ReadAllTextFromFile(Helpers.GetExpectedLogName(deploymentResult, _logFolderPath), Logger)); }
public static string InProcessHostfxrInvalid(IISDeploymentResult deploymentResult) { return($"Hostfxr version used does not support 'hostfxr_get_native_search_directories', update the version of hostfxr to a higher version. Path to hostfxr: '(.*)'."); }
private string GetANCMRequestHandlerPath(IISDeploymentResult deploymentResult, string version) { return(Path.Combine(deploymentResult.ContentRoot, deploymentResult.DeploymentParameters.RuntimeArchitecture.ToString(), version)); }
public static string CouldNotStartStdoutFileRedirection(string file, IISDeploymentResult deploymentResult) { return ($"Could not start stdout file redirection to '{Regex.Escape(file)}' with application base '{EscapedContentRoot(deploymentResult)}'."); }
private static string AncmVersionToMatch(IISDeploymentResult deploymentResult) { return("IIS " + (deploymentResult.DeploymentParameters.ServerType == ServerType.IISExpress ? "Express " : "") + "AspNetCore Module V2"); }
public static void AllowNoLogs(this IISDeploymentResult deploymentResult) { File.AppendAllText( Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"), "Running test allowed log file to be empty." + Environment.NewLine); }
public static string OutOfProcessStarted(IISDeploymentResult deploymentResult) { return($"Application '/LM/W3SVC/1/ROOT' started process '\\d+' successfully and process '\\d+' is listening on port '\\d+'."); }
private Task AssertSiteFailsToStartWithInProcessStaticContent(IISDeploymentResult deploymentResult) { return(AssertSiteFailsToStartWithInProcessStaticContent(deploymentResult, "HTTP Error 500.0 - ANCM In-Process Handler Load Failure")); }
public static string InProcessStarted(IISDeploymentResult deploymentResult) { return($"Application '{EscapedContentRoot(deploymentResult)}' started the coreclr in-process successfully"); }