Browse Source
Merge pull request #10680 from abpframework/DetailedErrors
[Blazor Server]Enable `DetailedErrors` in development environment.
pull/10697/head
albert
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
1 deletions
-
framework/src/Volo.Abp.AspNetCore.Components.Server/Volo/Abp/AspNetCore/Components/Server/AbpAspNetCoreComponentsServerModule.cs
|
|
|
@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Builder; |
|
|
|
using Microsoft.AspNetCore.Routing; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.FileProviders; |
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
using Volo.Abp.AspNetCore.Auditing; |
|
|
|
using Volo.Abp.AspNetCore.Components.Web; |
|
|
|
using Volo.Abp.AspNetCore.Mvc; |
|
|
|
@ -25,7 +26,13 @@ namespace Volo.Abp.AspNetCore.Components.Server |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var serverSideBlazorBuilder = context.Services.AddServerSideBlazor(); |
|
|
|
var serverSideBlazorBuilder = context.Services.AddServerSideBlazor(options => |
|
|
|
{ |
|
|
|
if (context.Services.GetHostingEnvironment().IsDevelopment()) |
|
|
|
{ |
|
|
|
options.DetailedErrors = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
context.Services.ExecutePreConfiguredActions(serverSideBlazorBuilder); |
|
|
|
|
|
|
|
Configure<AbpAspNetCoreUnitOfWorkOptions>(options => |
|
|
|
|