From 3ea304e1fa97462f01ccd10b5466f96ba5c6e5f4 Mon Sep 17 00:00:00 2001 From: Blake Niemyjski Date: Wed, 31 May 2023 09:20:27 -0500 Subject: [PATCH] Updated ServerUrl and Api Key to work with local server instances. (#309) --- .../appsettings.json | 4 ++-- .../Program.cs | 4 ++-- .../Exceptionless.SampleConsole/Program.cs | 2 +- .../appsettings.json | 4 ++-- .../Exceptionless.SampleLambda/Function.cs | 4 ++-- .../appsettings.json | 4 ++-- samples/Exceptionless.SampleMvc/Web.config | 4 ++-- samples/Exceptionless.SampleWcf/Web.config | 2 +- samples/Exceptionless.SampleWeb/Web.config | 4 ++-- samples/Exceptionless.SampleWebApi/App.config | 2 +- .../Exceptionless.SampleWindows/App.config | 2 +- .../Exceptionless.SampleWindows/Program.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../CertificateValidationTest.cs | 2 +- .../Configuration/ConfigurationTests.cs | 22 +++++++++---------- ...05_HandleAggregateExceptionsPluginTests.cs | 2 +- test/Exceptionless.Tests/app.config | 2 +- 17 files changed, 34 insertions(+), 34 deletions(-) diff --git a/samples/Exceptionless.SampleAspNetCore/appsettings.json b/samples/Exceptionless.SampleAspNetCore/appsettings.json index 5f5bc011..f258fbed 100644 --- a/samples/Exceptionless.SampleAspNetCore/appsettings.json +++ b/samples/Exceptionless.SampleAspNetCore/appsettings.json @@ -1,7 +1,7 @@ { "Exceptionless": { - "ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", - "ServerUrl": "http://localhost:5000", + "ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", + "ServerUrl": "https://localhost:5201", "DefaultData": { "JSON_OBJECT": "{ \"Name\": \"Blake\" }", "Boolean": true, diff --git a/samples/Exceptionless.SampleBlazorWebAssemblyApp/Program.cs b/samples/Exceptionless.SampleBlazorWebAssemblyApp/Program.cs index 1c1ab8c0..06d3a6bf 100644 --- a/samples/Exceptionless.SampleBlazorWebAssemblyApp/Program.cs +++ b/samples/Exceptionless.SampleBlazorWebAssemblyApp/Program.cs @@ -3,8 +3,8 @@ using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; -ExceptionlessClient.Default.Configuration.ServerUrl = "http://localhost:5000"; -ExceptionlessClient.Default.Startup("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw"); +ExceptionlessClient.Default.Configuration.ServerUrl = "https://localhost:5201"; +ExceptionlessClient.Default.Startup("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest"); var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); diff --git a/samples/Exceptionless.SampleConsole/Program.cs b/samples/Exceptionless.SampleConsole/Program.cs index d09cc57c..e259350e 100644 --- a/samples/Exceptionless.SampleConsole/Program.cs +++ b/samples/Exceptionless.SampleConsole/Program.cs @@ -17,7 +17,7 @@ using LogLevel = Exceptionless.Logging.LogLevel; // example of setting an attribute value in config. -[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", ServerUrl = "http://localhost:5000")] +[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", ServerUrl = "https://localhost:5201")] [assembly: ExceptionlessSetting("EnableWelcomeMessage", "True")] namespace Exceptionless.SampleConsole { diff --git a/samples/Exceptionless.SampleHosting/appsettings.json b/samples/Exceptionless.SampleHosting/appsettings.json index 5f5bc011..f258fbed 100644 --- a/samples/Exceptionless.SampleHosting/appsettings.json +++ b/samples/Exceptionless.SampleHosting/appsettings.json @@ -1,7 +1,7 @@ { "Exceptionless": { - "ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", - "ServerUrl": "http://localhost:5000", + "ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", + "ServerUrl": "https://localhost:5201", "DefaultData": { "JSON_OBJECT": "{ \"Name\": \"Blake\" }", "Boolean": true, diff --git a/samples/Exceptionless.SampleLambda/Function.cs b/samples/Exceptionless.SampleLambda/Function.cs index 6c6da127..26a5ef29 100644 --- a/samples/Exceptionless.SampleLambda/Function.cs +++ b/samples/Exceptionless.SampleLambda/Function.cs @@ -11,8 +11,8 @@ public class Function public async Task FunctionHandler(string input, ILambdaContext context) { var client = new ExceptionlessClient(c => { - c.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw"; - c.ServerUrl = "http://localhost:5000"; + c.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest"; + c.ServerUrl = "https://localhost:5201"; // read configuration values from environment variables c.ReadFromEnvironmentalVariables(); diff --git a/samples/Exceptionless.SampleLambdaAspNetCore/appsettings.json b/samples/Exceptionless.SampleLambdaAspNetCore/appsettings.json index bcb92628..a6f2a6c6 100644 --- a/samples/Exceptionless.SampleLambdaAspNetCore/appsettings.json +++ b/samples/Exceptionless.SampleLambdaAspNetCore/appsettings.json @@ -1,7 +1,7 @@ { "Exceptionless": { - "ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", - "ServerUrl": "http://localhost:5000", + "ApiKey": "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", + "ServerUrl": "https://localhost:5201", "ProcessQueueOnCompletedRequest": true, "DefaultData": { "JSON_OBJECT": "{ \"Name\": \"Blake\" }", diff --git a/samples/Exceptionless.SampleMvc/Web.config b/samples/Exceptionless.SampleMvc/Web.config index eee9d2ec..2f80847e 100644 --- a/samples/Exceptionless.SampleMvc/Web.config +++ b/samples/Exceptionless.SampleMvc/Web.config @@ -1,8 +1,8 @@  - - + + diff --git a/samples/Exceptionless.SampleWcf/Web.config b/samples/Exceptionless.SampleWcf/Web.config index d6d32a0e..d6a31a9c 100644 --- a/samples/Exceptionless.SampleWcf/Web.config +++ b/samples/Exceptionless.SampleWcf/Web.config @@ -4,7 +4,7 @@
- + diff --git a/samples/Exceptionless.SampleWeb/Web.config b/samples/Exceptionless.SampleWeb/Web.config index 7a446b5d..306099d1 100644 --- a/samples/Exceptionless.SampleWeb/Web.config +++ b/samples/Exceptionless.SampleWeb/Web.config @@ -3,8 +3,8 @@
- - diff --git a/samples/Exceptionless.SampleWebApi/App.config b/samples/Exceptionless.SampleWebApi/App.config index b97dc33f..67b453c5 100644 --- a/samples/Exceptionless.SampleWebApi/App.config +++ b/samples/Exceptionless.SampleWebApi/App.config @@ -3,7 +3,7 @@
- + diff --git a/samples/Exceptionless.SampleWindows/App.config b/samples/Exceptionless.SampleWindows/App.config index 1c1b2a74..b731eec5 100644 --- a/samples/Exceptionless.SampleWindows/App.config +++ b/samples/Exceptionless.SampleWindows/App.config @@ -4,7 +4,7 @@
- + diff --git a/samples/Exceptionless.SampleWindows/Program.cs b/samples/Exceptionless.SampleWindows/Program.cs index c0e51c22..96a64e85 100644 --- a/samples/Exceptionless.SampleWindows/Program.cs +++ b/samples/Exceptionless.SampleWindows/Program.cs @@ -3,7 +3,7 @@ using System.Windows.Forms; using Exceptionless.Configuration; -[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", ServerUrl = "http://localhost:5000")] +[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", ServerUrl = "https://localhost:5201")] namespace Exceptionless.SampleWindows { internal static class Program { diff --git a/samples/Exceptionless.SampleWpf/Properties/AssemblyInfo.cs b/samples/Exceptionless.SampleWpf/Properties/AssemblyInfo.cs index f20ad852..8ce68a87 100644 --- a/samples/Exceptionless.SampleWpf/Properties/AssemblyInfo.cs +++ b/samples/Exceptionless.SampleWpf/Properties/AssemblyInfo.cs @@ -2,4 +2,4 @@ using Exceptionless.Configuration; [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] -[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", ServerUrl = "http://localhost:5000")] \ No newline at end of file +[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", ServerUrl = "https://localhost:5201")] \ No newline at end of file diff --git a/test/Exceptionless.Tests/Configuration/CertificateValidationTest.cs b/test/Exceptionless.Tests/Configuration/CertificateValidationTest.cs index 9dd749dc..32f1ccd0 100644 --- a/test/Exceptionless.Tests/Configuration/CertificateValidationTest.cs +++ b/test/Exceptionless.Tests/Configuration/CertificateValidationTest.cs @@ -63,7 +63,7 @@ private async Task RunAsync(ExceptionlessClient client) { } private ExceptionlessClient GetClient(Func validator, string serverUrl) { - return new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw") { + return new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest") { Configuration = { ServerUrl = serverUrl, ServerCertificateValidationCallback = validator diff --git a/test/Exceptionless.Tests/Configuration/ConfigurationTests.cs b/test/Exceptionless.Tests/Configuration/ConfigurationTests.cs index 5b82a581..03acfc26 100644 --- a/test/Exceptionless.Tests/Configuration/ConfigurationTests.cs +++ b/test/Exceptionless.Tests/Configuration/ConfigurationTests.cs @@ -15,7 +15,7 @@ using Xunit; using Xunit.Abstractions; -[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", ServerUrl = "http://localhost:45000")] +[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", ServerUrl = "https://localhost:5201")] [assembly: ExceptionlessSetting("testing", "configuration")] namespace Exceptionless.Tests.Configuration { public class ConfigurationTests { @@ -26,9 +26,9 @@ public ConfigurationTests(ITestOutputHelper output) { [Fact] public void CanConfigureApiKeyFromClientConstructor() { - var client = new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw"); + var client = new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest"); Assert.NotNull(client); - Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", client.Configuration.ApiKey); + Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", client.Configuration.ApiKey); Assert.True(client.Configuration.IncludePrivateInformation); Assert.True(client.Configuration.IncludeUserName); Assert.True(client.Configuration.IncludeMachineName); @@ -64,14 +64,14 @@ public void CanConfigureClientUsingActionMethod() { const string version = "1.2.3"; var client = new ExceptionlessClient(c => { - c.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw"; - c.ServerUrl = "http://localhost:45000"; + c.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest"; + c.ServerUrl = "https://localhost:5201"; c.SetVersion(version); c.IncludeUserName = false; }); - Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", client.Configuration.ApiKey); - Assert.Equal("http://localhost:45000", client.Configuration.ServerUrl); + Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", client.Configuration.ApiKey); + Assert.Equal("https://localhost:5201", client.Configuration.ServerUrl); Assert.Equal(version, client.Configuration.DefaultData[Event.KnownDataKeys.Version].ToString()); Assert.True(client.Configuration.IncludePrivateInformation); @@ -91,8 +91,8 @@ public void CanReadFromAttributes() { Assert.Empty(config.Settings); config.ReadFromAttributes(typeof(ConfigurationTests).GetTypeInfo().Assembly); - Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", config.ApiKey); - Assert.Equal("http://localhost:45000", config.ServerUrl); + Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", config.ApiKey); + Assert.Equal("https://localhost:5201", config.ServerUrl); Assert.Single(config.Settings); Assert.Equal("configuration", config.Settings["testing"]); } @@ -101,7 +101,7 @@ public void CanReadFromAttributes() { public void WillLockConfig() { var client = new ExceptionlessClient(); client.Configuration.Resolver.Register(); - client.Configuration.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw"; + client.Configuration.ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest"; client.SubmitEvent(new Event()); Assert.Throws(() => client.Configuration.ApiKey = "blah"); Assert.Throws(() => client.Configuration.ServerUrl = "blah"); @@ -110,7 +110,7 @@ public void WillLockConfig() { [Fact] public async Task CanUpdateSettingsFromServer() { var config = new ExceptionlessConfiguration(DependencyResolver.Default) { - ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", + ApiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest", Settings = { ["LocalSetting"] = "1", ["LocalSettingToOverride"] = "1" diff --git a/test/Exceptionless.Tests/Plugins/005_HandleAggregateExceptionsPluginTests.cs b/test/Exceptionless.Tests/Plugins/005_HandleAggregateExceptionsPluginTests.cs index 5086567e..05f9d670 100644 --- a/test/Exceptionless.Tests/Plugins/005_HandleAggregateExceptionsPluginTests.cs +++ b/test/Exceptionless.Tests/Plugins/005_HandleAggregateExceptionsPluginTests.cs @@ -41,7 +41,7 @@ public void SingleInnerException() { [Fact] public async Task MultipleInnerException() { var submissionClient = new InMemorySubmissionClient(); - var client = new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw"); + var client = new ExceptionlessClient("LhhP1C9gijpSKCslHHCvwdSIz298twx271nTest"); client.Configuration.Resolver.Register(submissionClient); var plugin = new HandleAggregateExceptionsPlugin(); diff --git a/test/Exceptionless.Tests/app.config b/test/Exceptionless.Tests/app.config index 9774b00d..7bcdd72d 100644 --- a/test/Exceptionless.Tests/app.config +++ b/test/Exceptionless.Tests/app.config @@ -4,7 +4,7 @@
- +