Exemple #1
0
 public static string InProcessThreadException(IISDeploymentResult deploymentResult, string reason)
 {
     return($"Application '/LM/W3SVC/1/ROOT' with physical root '{EscapedContentRoot(deploymentResult)}' hit unexpected managed exception{reason}");
 }
Exemple #2
0
 public static string ShutdownFileChange(IISDeploymentResult deploymentResult)
 {
     return($"Application '{EscapedContentRoot(deploymentResult)}' was recycled after detecting file change in application directory.");
 }
Exemple #3
0
 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"));
 }
Exemple #5
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}");
 }
Exemple #6
0
 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.");
 }
Exemple #7
0
 private void AssertFrebLogs(IISDeploymentResult result, params FrebLogItem[] expectedFrebEvents)
 {
     AssertFrebLogs(result, (IEnumerable <FrebLogItem>)expectedFrebEvents);
 }
Exemple #8
0
 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.");
 }
Exemple #9
0
        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());
        }
Exemple #10
0
 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.");
 }
Exemple #11
0
 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.");
 }
Exemple #12
0
 public static string ConfigurationLoadError(IISDeploymentResult deploymentResult, string reason)
 {
     return($"Could not load configuration. Exception message: {reason}");
 }
Exemple #13
0
 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}");
 }
Exemple #14
0
 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}'.");
 }
Exemple #15
0
 public static string FailedToStartApplication(IISDeploymentResult deploymentResult, string code)
 {
     return($"Failed to start application '/LM/W3SVC/1/ROOT', ErrorCode '{code}'.");
 }
Exemple #16
0
 public string GetLogFileContent(IISDeploymentResult deploymentResult)
 {
     return(Helpers.ReadAllTextFromFile(Helpers.GetExpectedLogName(deploymentResult, _logFolderPath), Logger));
 }
Exemple #17
0
 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));
 }
Exemple #19
0
 public static string CouldNotStartStdoutFileRedirection(string file, IISDeploymentResult deploymentResult)
 {
     return
         ($"Could not start stdout file redirection to '{Regex.Escape(file)}' with application base '{EscapedContentRoot(deploymentResult)}'.");
 }
Exemple #20
0
 private static string AncmVersionToMatch(IISDeploymentResult deploymentResult)
 {
     return("IIS " +
            (deploymentResult.DeploymentParameters.ServerType == ServerType.IISExpress ? "Express " : "") +
            "AspNetCore Module V2");
 }
Exemple #21
0
 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);
 }
Exemple #22
0
 public static string OutOfProcessStarted(IISDeploymentResult deploymentResult)
 {
     return($"Application '/LM/W3SVC/1/ROOT' started process '\\d+' successfully and process '\\d+' is listening on port '\\d+'.");
 }
Exemple #23
0
 private Task AssertSiteFailsToStartWithInProcessStaticContent(IISDeploymentResult deploymentResult)
 {
     return(AssertSiteFailsToStartWithInProcessStaticContent(deploymentResult, "HTTP Error 500.0 - ANCM In-Process Handler Load Failure"));
 }
Exemple #24
0
 public static string InProcessStarted(IISDeploymentResult deploymentResult)
 {
     return($"Application '{EscapedContentRoot(deploymentResult)}' started the coreclr in-process successfully");
 }