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 2
2
3
3
<PropertyGroup >
4
4
<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 >
11
5
</PropertyGroup >
12
6
13
7
<ItemGroup >
Original file line number Diff line number Diff line change @@ -13,22 +13,26 @@ public Startup(IConfiguration configuration) {
13
13
public IConfiguration Configuration { get ; }
14
14
15
15
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
17
18
services . AddExceptionless ( c => c . DefaultData [ "Startup" ] = "heyyy" ) ;
18
19
// OR
19
- // services.AddExceptionless(c => c.ApiKey = "API_KEY_HERE" );
20
+ // services.AddExceptionless();
20
21
// OR
21
22
// services.AddExceptionless("API_KEY_HERE");
22
23
23
24
// This enables Exceptionless to gather more detailed information about unhandled exceptions and other events
24
25
services . AddHttpContextAccessor ( ) ;
26
+
27
+ // This is normal ASP.NET code
25
28
services . AddControllers ( ) ;
26
29
}
27
30
28
31
public void Configure ( IApplicationBuilder app , IWebHostEnvironment env ) {
29
32
// Adds Exceptionless middleware to listen for unhandled exceptions
30
33
app . UseExceptionless ( ) ;
31
34
35
+ // This is normal ASP.NET code
32
36
app . UseRouting ( ) ;
33
37
app . UseEndpoints ( endpoints => {
34
38
endpoints . MapControllers ( ) ;
You can’t perform that action at this time.
0 commit comments