File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
samples/Exceptionless.SampleAspNetCore Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <TargetFramework >netcoreapp3.1</TargetFramework >
5- <DebugType >portable</DebugType >
6- <PreserveCompilationContext >true</PreserveCompilationContext >
7- <AssemblyName >Exceptionless.SampleAspNetCore</AssemblyName >
8- <OutputType >Exe</OutputType >
9- <PackageId >Exceptionless.SampleAspNetCore</PackageId >
10- <DefineConstants >$(DefineConstants);NETSTANDARD;NETSTANDARD2_0</DefineConstants >
115 </PropertyGroup >
126
137 <ItemGroup >
Original file line number Diff line number Diff line change @@ -13,22 +13,26 @@ public Startup(IConfiguration configuration) {
1313 public IConfiguration Configuration { get ; }
1414
1515 public void ConfigureServices ( IServiceCollection services ) {
16- // Reads settings from IConfiguration
16+ // Reads settings from IConfiguration then adds additional configuration from this lambda.
17+ // This also configures ExceptionlessClient.Default
1718 services . AddExceptionless ( c => c . DefaultData [ "Startup" ] = "heyyy" ) ;
1819 // OR
19- // services.AddExceptionless(c => c.ApiKey = "API_KEY_HERE" );
20+ // services.AddExceptionless();
2021 // OR
2122 // services.AddExceptionless("API_KEY_HERE");
2223
2324 // This enables Exceptionless to gather more detailed information about unhandled exceptions and other events
2425 services . AddHttpContextAccessor ( ) ;
26+
27+ // This is normal ASP.NET code
2528 services . AddControllers ( ) ;
2629 }
2730
2831 public void Configure ( IApplicationBuilder app , IWebHostEnvironment env ) {
2932 // Adds Exceptionless middleware to listen for unhandled exceptions
3033 app . UseExceptionless ( ) ;
3134
35+ // This is normal ASP.NET code
3236 app . UseRouting ( ) ;
3337 app . UseEndpoints ( endpoints => {
3438 endpoints . MapControllers ( ) ;
You can’t perform that action at this time.
0 commit comments