已经添加了 谢谢
启用浏览器流上传可以解决~
info: System.Net.Http.HttpClient.Contract.LogicalHandler[100]
Start processing HTTP request POST https://localhost:44333/api/contract/contract-attachments/upload-file?*
invoke-js.ts:242 info: System.Net.Http.HttpClient.Contract.ClientHandler[100]
Sending HTTP request POST https://localhost:44333/api/contract/contract-attachments/upload-file?*
HTGL:1 The resource https://localhost:44333/_content/Excubo.Blazor.TreeViews/Excubo.Blazor.TreeViews.ggbo2a6x37.bundle.scp.css was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
HTGL:1 The resource
[Violation] Forced reflow while executing JavaScript took 116ms
blazor.web.js:1 Cannot enlarge memory, requested 2586399504 bytes, but the limit is 2147483648 bytes! 报错了.
private async Task<AppFileDescriptorDto> UploadFileAsync(IBrowserFile file)
{
using (var ms = new MemoryStream())
{
await file.OpenReadStream(long.MaxValue).CopyToAsync(ms);
ms.Seek(0, SeekOrigin.Begin);
return await ContractAttachmentsAppService.UploadFileAsync(new RemoteStreamContent(ms, file.Name, file.ContentType));
}
}
600MB左右的文件会报 内存溢出
abp suite的file 属性,直接将文件 copy到少stream. 大文件的话js arry会报内存溢出
有Chrome浏览器环境.
已发送
namespace TechGenius.Blazor;
[DependsOn(
typeof(TechGeniusApplicationModule),
typeof(TechGeniusEntityFrameworkCoreModule),
typeof(TechGeniusHttpApiModule),
typeof(AbpAutofacModule),
typeof(AbpSwashbuckleModule),
typeof(AbpAccountPublicBlazorWebAssemblyBundlingModule),
typeof(AbpAccountPublicWebImpersonationModule),
typeof(AbpAccountPublicWebOpenIddictModule),
typeof(AbpAccountPublicBlazorServerModule),
typeof(AbpAccountAdminBlazorServerModule),
typeof(AbpIdentityProBlazorServerModule),
typeof(TextTemplateManagementBlazorServerModule),
typeof(AbpAuditLoggingBlazorServerModule),
typeof(AbpAuditLoggingBlazorWebAssemblyBundlingModule),
typeof(AbpGdprBlazorServerModule),
typeof(AbpOpenIddictProBlazorServerModule),
typeof(LanguageManagementBlazorServerModule),
typeof(SaasHostBlazorServerModule),
typeof(SaasHostBlazorWebAssemblyBundlingModule),
typeof(AbpAspNetCoreComponentsServerLeptonXThemeModule),
typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXThemeBundlingModule),
typeof(AbpAspNetCoreMvcUiLeptonXThemeModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(ChatBlazorServerModule),
typeof(ChatSignalRModule),
typeof(AbpAspNetCoreMvcUiBundlingModule)
,typeof(AbpAuditLoggingBlazorWebAssemblyBundlingModule)
//,typeof(FileManagementBlazorWebAssemblyBundlingModule)
,typeof(SaasHostBlazorWebAssemblyBundlingModule)
// ,typeof(ChatBlazorWebAssemblyBundlingModule)
// ,typeof(CmsKitProAdminBlazorWebAssemblyBundlingModule)
//typeof(AbpAspNetCoreComponentsWebThemingModule)
)]
public class TechGeniusBlazorModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
context.Services.AddSyncfusionBlazor();
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(
typeof(TechGeniusResource),
typeof(TechGeniusDomainModule).Assembly,
typeof(TechGeniusDomainSharedModule).Assembly,
typeof(TechGeniusApplicationModule).Assembly,
typeof(TechGeniusApplicationContractsModule).Assembly,
typeof(TechGeniusBlazorModule).Assembly
);
});
PreConfigure<OpenIddictBuilder>(builder =>
{
builder.AddValidation(options =>
{
options.AddAudiences("TechGenius");
options.UseLocalServer();
options.UseAspNetCore();
});
});
if (!hostingEnvironment.IsDevelopment())
{
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options =>
{
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});
PreConfigure<OpenIddictServerBuilder>(serverBuilder =>
{
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", configuration["AuthServer:CertificatePassPhrase"]!);
serverBuilder.SetIssuer(new Uri(configuration["AuthServer:Authority"]!));
});
}
PreConfigure<AbpAspNetCoreComponentsWebOptions>(options =>
{
options.IsBlazorWebApp = true;
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
// Add services to the container.
context.Services.AddRazorComponents()
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
if (!configuration.GetValue<bool>("App:DisablePII"))
{
Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true;
Microsoft.IdentityModel.Logging.IdentityModelEventSource.LogCompleteSecurityArtifact = true;
}
if (!configuration.GetValue<bool>("AuthServer:RequireHttpsMetadata"))
{
Configure<OpenIddictServerAspNetCoreOptions>(options =>
{
options.DisableTransportSecurityRequirement = true;
});
}
context.Services.AddDevExpressBlazor();
context.Services.AddSyncfusionBlazor();
Configure<AbpStudioClientOptions>(options =>
{
options.IsLinkEnabled = false;
//options.StudioUrl = "";
});
ConfigureAuthentication(context);
ConfigureUrls(configuration);
ConfigureBundles();
ConfigureImpersonation(context, configuration);
//ConfigureAutoMapper(context);
ConfigureVirtualFileSystem(hostingEnvironment);
ConfigureSwaggerServices(context.Services);
//启用跨域
//ConfigureCors(context, configuration);
ConfigureExternalProviders(context, configuration);
ConfigureAutoApiControllers();
ConfigureBlazorise(context);
ConfigureRouter(context);
ConfigureMenu(context);
ConfigureCookieConsent(context);
ConfigureTheme();
ConfigureOllama(context);
Configure<AbpToolbarOptions>(options =>
{
options.Contributors.Add(new DoctorAIToolbarContributor());
// options.Contributors.Add(new TGAIToolbarContributor());
});
}
private void ConfigureOllama(ServiceConfigurationContext context)
{
McAITools mcAITools = new McAITools();
//9.3
IChatClient client = new OllamaApiClient(
"http://172.20.1.57:11434/",
"qwq:32b");
client = ChatClientBuilderChatClientExtensions
.AsBuilder(client)
.UseFunctionInvocation()
.ConfigureOptions(opt =>
{
opt.Tools = [AIFunctionFactory.Create(mcAITools.GetMd)];
})
.Build();
context.Services.AddDevExpressBlazor();
context.Services.AddSingleton(client);
context.Services.AddDevExpressAI();
}
private void ConfigureCookieConsent(ServiceConfigurationContext context)
{
context.Services.AddAbpCookieConsent(options =>
{
options.IsEnabled = true;
options.CookiePolicyUrl = "/CookiePolicy";
options.PrivacyPolicyUrl = "/PrivacyPolicy";
});
}
private void ConfigureTheme()
{
Configure<LeptonXThemeOptions>(options =>
{
options.DefaultStyle = LeptonXStyleNames.System;
});
Configure<LeptonXThemeMvcOptions>(options =>
{
options.ApplicationLayout = LeptonXMvcLayouts.SideMenu;
});
Configure<LeptonXThemeBlazorOptions>(options =>
{
options.Layout = LeptonXBlazorLayouts.SideMenu;
});
}
private void ConfigureAuthentication(ServiceConfigurationContext context)
{
context.Services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme);
context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureUrls(IConfiguration configuration)
{
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"]?.Split(',') ?? Array.Empty<string>());
});
}
private void ConfigureBundles()
{
Configure<AbpBundlingOptions>(options =>
{
options.Parameters.InteractiveAuto = true;
// MVC UI
options.StyleBundles.Configure(
LeptonXThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/global-styles.css");
}
);
options.ScriptBundles.Configure(
LeptonXThemeBundles.Scripts.Global,
bundle =>
{
bundle.AddFiles("/global-scripts.js");
}
);
// Blazor UI
options.StyleBundles.Configure(
BlazorLeptonXThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/global-styles.css");
}
);
});
Configure<AbpBundlingOptions>(options =>
{
var globalStyles = options.StyleBundles.Get(BlazorWebAssemblyStandardBundles.Styles.Global);
globalStyles.AddContributors(typeof(TechGeniusStyleBundleContributor));
var globalScripts = options.ScriptBundles.Get(BlazorWebAssemblyStandardBundles.Scripts.Global);
globalScripts.AddContributors(typeof(TechGeniusScriptBundleContributor));
options.Parameters["LeptonXTheme.Layout"] = "side-menu"; // side-menu or top-menu
});
}
private void ConfigureImpersonation(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.Configure<SaasHostBlazorOptions>(options =>
{
options.EnableTenantImpersonation = true;
});
context.Services.Configure<AbpIdentityProBlazorOptions>(options =>
{
options.EnableUserImpersonation = true;
});
context.Services.Configure<AbpAccountOptions>(options =>
{
options.TenantAdminUserName = "admin";
options.ImpersonationTenantPermission = SaasHostPermissions.Tenants.Impersonation;
options.ImpersonationUserPermission = IdentityPermissions.Users.Impersonation;
});
}
private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment)
{
if (hostingEnvironment.IsDevelopment())
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<TechGeniusDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}TechGenius.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<TechGeniusDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}TechGenius.Domain"));
options.FileSets.ReplaceEmbeddedByPhysical<TechGeniusApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}TechGenius.Application.Contracts"));
options.FileSets.ReplaceEmbeddedByPhysical<TechGeniusApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}TechGenius.Application"));
options.FileSets.ReplaceEmbeddedByPhysical<TechGeniusBlazorModule>(hostingEnvironment.ContentRootPath);
});
}
}
private void ConfigureSwaggerServices(IServiceCollection services)
{
services.AddAbpSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "TechGenius API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
}
);
}
private void ConfigureExternalProviders(ServiceConfigurationContext context, IConfiguration configuration)
{
~~~~
}
private void ConfigureBlazorise(ServiceConfigurationContext context)
{
context.Services
.AddBlazorise(options =>
{
// TODO (IMPORTANT): To use Blazorise, you need a license key. Get your license key directly from Blazorise, follow the instructions at https://abp.io/faq#how-to-get-blazorise-license-key
options.ProductToken = "";
})
.AddBootstrap5Providers()
.AddFontAwesomeIcons();
}
private void ConfigureMenu(ServiceConfigurationContext context)
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new TechGeniusMenuContributor(context.Services.GetConfiguration()));
});
}
private void ConfigureRouter(ServiceConfigurationContext context)
{
Configure<AbpRouterOptions>(options =>
{
options.AppAssembly = typeof(TechGeniusBlazorModule).Assembly;
options.AdditionalAssemblies.Add(typeof(TechGeniusBlazorClientModule).Assembly);
});
}
private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(TechGeniusApplicationModule).Assembly);
});
}
private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration)
{
~~~~
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var env = context.GetEnvironment();
var app = context.GetApplicationBuilder();
app.Use(async (ctx, next) =>
{
/* Converting to https to be able to include https URLs in `/.well-known/openid-configuration` endpoint.
* This should only be done if the request is coming outside of the cluster. */
if (ctx.Request.Headers.ContainsKey("from-ingress"))
{
ctx.Request.Scheme = "https";
}
await next();
});
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseAbpRequestLocalization();
if (!env.IsDevelopment())
{
app.UseErrorPage();
app.UseHsts();
}
app.UseCorrelationId();
app.MapAbpStaticAssets();
app.UseRouting();
var configuration = context.GetConfiguration();
if (Convert.ToBoolean(configuration["AuthServer:IsOnK8s"]))
{
app.Use(async (context, next) =>
{
if (context.Request.Path.Value != null &&
context.Request.Path.Value.StartsWith("/appsettings", StringComparison.OrdinalIgnoreCase) &&
context.Request.Path.Value.EndsWith(".json", StringComparison.OrdinalIgnoreCase))
{
// Set endpoint to null so the static files middleware will handle the request.
context.SetEndpoint(null);
}
await next(context);
});
app.UseStaticFilesForPatterns("appsettings*.json");
}
app.UseAbpSecurityHeaders();
//app.UseCors();
app.UseAuthentication();
app.UseAbpOpenIddictValidation();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseDynamicClaims();
app.UseAntiforgery();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "TechGenius API");
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints(builder =>
{
builder.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(builder.ServiceProvider.GetRequiredService<IOptions<AbpRouterOptions>>().Value.AdditionalAssemblies.ToArray());
});
}
}
using System;
using System.Net.Http;
using Blazorise;
using Blazorise.Bootstrap5;
using Blazorise.Icons.FontAwesome;
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using OpenIddict.Abstractions;
using Syncfusion.Blazor;
using System;
using System.Net.Http;
using TechGenius.Blazor.Client.Components.Layout;
using TechGenius.Blazor.Client.Navigation;
using OpenIddict.Abstractions;
using Volo.Abp.AspNetCore.Components.Web;
using Volo.Abp.AspNetCore.Components.Web.Theming.Routing;
using Volo.Abp.Autofac.WebAssembly;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
using Volo.Abp.UI.Navigation;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling;
using TechGenius.Blazor.Client.Components.Layout;
using Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXTheme;
using Volo.Abp.AspNetCore.Components.Web.LeptonXTheme;
using Volo.Abp.LeptonX.Shared;
using Volo.Abp.SettingManagement.Blazor.WebAssembly;
using Volo.Abp.FeatureManagement.Blazor.WebAssembly;
using Volo.Abp.Account.Pro.Admin.Blazor.WebAssembly;
using Volo.Abp.Account.Pro.Public.Blazor.WebAssembly;
using Volo.Abp.Identity.Pro.Blazor.Server.WebAssembly;
using Volo.Abp.Identity.Pro.Blazor;
using Volo.Abp.AuditLogging.Blazor.WebAssembly;
using Volo.Abp.Gdpr.Blazor.Extensions;
using Volo.Abp.Gdpr.Blazor.WebAssembly;
using Volo.Abp.LanguageManagement.Blazor.WebAssembly;
using Volo.Abp.OpenIddict.Pro.Blazor.WebAssembly;
using Volo.Abp.TextTemplateManagement.Blazor.WebAssembly;
using Volo.Saas.Host.Blazor;
using Volo.Saas.Host.Blazor.WebAssembly;
using Volo.Chat.Blazor.WebAssembly;
using Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components;
using Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXTheme.Bundling;
namespace TechGenius.Blazor.Client;
[DependsOn(
typeof(AbpSettingManagementBlazorWebAssemblyModule),
typeof(AbpFeatureManagementBlazorWebAssemblyModule),
typeof(AbpAccountAdminBlazorWebAssemblyModule),
typeof(AbpAccountPublicBlazorWebAssemblyModule),
typeof(AbpIdentityProBlazorWebAssemblyModule),
typeof(SaasHostBlazorWebAssemblyModule),
typeof(AbpOpenIddictProBlazorWebAssemblyModule),
typeof(AbpAuditLoggingBlazorWebAssemblyModule),
typeof(AbpGdprBlazorWebAssemblyModule),
typeof(TextTemplateManagementBlazorWebAssemblyModule),
typeof(LanguageManagementBlazorWebAssemblyModule),
typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXThemeBundlingModule),
typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXThemeModule),
typeof(AbpAutofacWebAssemblyModule),
typeof(TechGeniusHttpApiClientModule),
typeof(ChatBlazorWebAssemblyModule)
) ]
public class TechGeniusBlazorClientModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpAspNetCoreComponentsWebOptions>(options =>
{
options.IsBlazorWebApp = true;
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var environment = context.Services.GetSingletonInstance<IWebAssemblyHostEnvironment>();
var builder = context.Services.GetSingletonInstance<WebAssemblyHostBuilder>();
context.Services.AddDevExpressBlazor();
context.Services.AddSyncfusionBlazor();
ConfigureAuthentication(builder);
ConfigureImpersonation(context);
ConfigureHttpClient(context, environment);
ConfigureBlazorise(context);
ConfigureRouter(context);
ConfigureMenu(context);
ConfigureCookieConsent(context);
ConfigureTheme();
ConfigureBundles();
//ConfigureAutoMapper(context);
}
private void ConfigureBundles()
{
Configure<AbpBundlingOptions>(options =>
{
//var globalScripts = options.ScriptBundles.Get(BlazorWebAssemblyStandardBundles.Scripts.Global);
//globalScripts.AddContributors(typeof(MonacoBundleScriptContributor));
//options
// .ScriptBundles
// .Add("MyGlobalBundle", bundle =>
// {
// bundle.AddFiles(
// "_content/BlazorMonaco/jsInterop.js",
// "_content/BlazorMonaco/lib/monaco-editor/min/vs/loader.js",
// "_content/BlazorMonaco/lib/monaco-editor/min/vs/editor/editor.main.js"
// );
// });
//options.ScriptBundles.Configure(
////BlazorWebAssemblyStandardBundles
//// BlazorLeptonXThemeBundles
//// Or BasicThemeBundles.Scripts.Global
//// Or LeptonXLiteThemeBundles.Scripts.Global
//// 👇 Depends on the theme you are using
//BlazorWebAssemblyStandardBundles.Scripts.Global,
//bundle =>
//{
// bundle.AddContributors(typeof(MonacoBundleScriptContributor));
//});
options.ScriptBundles.Configure(
BlazorWebAssemblyStandardBundles.Scripts.Global,
bundle =>
{
bundle.AddFiles("_content/BlazorMonaco/jsInterop.js");
bundle.AddFiles("_content/BlazorMonaco/lib/monaco-editor/min/vs/loader.js");
bundle.AddFiles("_content/BlazorMonaco/lib/monaco-editor/min/vs/editor/editor.main.js");
}
);
//options.ScriptBundles.Configure(
//// Or BasicThemeBundles.Scripts.Global
//// Or LeptonXLiteThemeBundles.Scripts.Global
//// 👇 Depends on the theme you are using
//BlazorLeptonXThemeBundles.Scripts.Global,
//bundle =>
//{
// bundle.AddFiles(new BundleFile("/vue.js", true));
// // 👇 Make sure to add this line
// bundle.AddContributors(typeof(Vue3Contributor));
//});
});
}
private void ConfigureCookieConsent(ServiceConfigurationContext context)
{
context.Services.AddAbpCookieConsent(options =>
{
options.IsEnabled = true;
options.CookiePolicyUrl = "/CookiePolicy";
options.PrivacyPolicyUrl = "/PrivacyPolicy";
});
}
private void ConfigureTheme()
{
Configure<LeptonXThemeOptions>(options =>
{
options.DefaultStyle = LeptonXStyleNames.System;
});
Configure<LeptonXThemeBlazorOptions>(options =>
{
// When Layout is changed, the `options.Parameters["LeptonXTheme.Layout"]` in TechGeniusBlazorModule.cs should be updated accordingly.
options.Layout = LeptonXBlazorLayouts.SideMenu;
});
}
private void ConfigureRouter(ServiceConfigurationContext context)
{
Configure<AbpRouterOptions>(options =>
{
options.AppAssembly = typeof(TechGeniusBlazorClientModule).Assembly;
options.AdditionalAssemblies.Add(typeof(TechGeniusBlazorClientModule).Assembly);
});
}
private void ConfigureMenu(ServiceConfigurationContext context)
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new TechGeniusMenuContributor(context.Services.GetConfiguration()));
});
}
private void ConfigureBlazorise(ServiceConfigurationContext context)
{
context.Services
.AddBlazorise(options =>
{
// TODO (IMPORTANT): To use Blazorise, you need a license key. Get your license key directly from Blazorise, follow the instructions at https://abp.io/faq#how-to-get-blazorise-license-key
options.ProductToken = "xxx";
})
.AddBootstrap5Providers()
.AddFontAwesomeIcons();
}
private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
{
builder.Services.AddBlazorWebAppServices();
}
private void ConfigureImpersonation(ServiceConfigurationContext context)
{
context.Services.Configure<SaasHostBlazorOptions>(options =>
{
options.EnableTenantImpersonation = true;
});
context.Services.Configure<AbpIdentityProBlazorOptions>(options =>
{
options.EnableUserImpersonation = true;
});
}
private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment)
{
context.Services.AddTransient(sp => new HttpClient
{
BaseAddress = new Uri(environment.BaseAddress)
});
}
//private void ConfigureAutoMapper(ServiceConfigurationContext context)
//{
// context.Services.AddAutoMapperObjectMapper();
// Configure<AbpAutoMapperOptions>(options =>
// {
// options.AddMaps<TechGeniusBlazorClientModule>();
// });
//}
}
global.js 也无法访问.移除了MonacoBundleScriptContributor,在client项目直接添加了JS