Dear Support Team,
We are developing a public site which will be hosed on frontend webserver with no connection directly to the database. The site should consume the API services which is hosted on the application server.We tried removing the connection string on the public website, however, we encountered errors on the startup file. Kindly advise how to proceed to develop the public site.
What is your product version? v8.1.0
What is your product type (Angular or MVC)? .Angular
What is product framework type (.net framework or .net core)? -.NET Core 3.1 - v8.1.0
If issue related with ABP Framework
- What is ABP Framework version? .NET core 3.1
5 Answer(s)
-
0
hi
however, we encountered errors on the startup file.
Can you share the details of error?
The
Web.Public
is usingWeb.Core
so its depends onEntityFrameworkCore
. if you don't need those you can remove it. -
0
In startup configure method we have commented ' app.UseAbp();' as it was throwing connection string not found related exceptions. Now we are getting ComponentActivatorException exception at 'app.UseEndpoints' line of code (attached screenshot)
The public website is using localisation module for static contents and other shared helper methods. Removing the web.core reference will affect the localisation module as well.
-
0
hi @sysberriestechnology
You shouldn't commented
app.UseAbp()
.You can refer to the code of the
web.core
module to change theweb.public
module, and remove the codes related to EF Core. -
0
Hi Team,
- Tried referring 'WebCoreModule', removed dependency of 'WebCoreModule' from 'WebFrontEndModule' of public website and add the dependency manually excluding the 'EntityFrameworkCoreModule'. Tried to run the application got an exception in 'CoreModule' (IocManager.Resolve<ChatUserStateWatcher>().Initialize()), commented the same now the site is showing internal error(Can't create component 'Abp.MultiTenancy.TenantCache`). Attaching the log files and screenshots.
DEBUG 2020-09-01 12:09:52,830 [1 ] Abp.Modules.AbpModuleManager - Loading Abp modules... DEBUG 2020-09-01 12:09:53,706 [1 ] Abp.Modules.AbpModuleManager - Found 20 ABP modules in total. DEBUG 2020-09-01 12:09:53,857 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SysApp.Web.Public.Startup.SysAppWebFrontEndModule, SysApp.Web.Public, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,862 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SysApp.Web.SysAppWebCoreModule, SysApp.Web.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,864 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SysApp.SysAppApplicationModule, SysApp.Application, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,865 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SysApp.SysAppApplicationSharedModule, SysApp.Application.Shared, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,865 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SysApp.SysAppCoreSharedModule, SysApp.Core.Shared, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,866 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SysApp.SysAppCoreModule, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,866 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.ZeroCore, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,866 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCommonModule, Abp.Zero.Common, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,867 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AbpKernelModule, Abp, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,867 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.Ldap.AbpZeroLdapModule, Abp.Zero.Ldap, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,868 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,868 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AspNetZeroCore.AbpAspNetZeroCoreModule, Abp.AspNetZeroCore, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,869 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.MailKit.AbpMailKitModule, Abp.MailKit, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,869 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AspNetZeroCore.Web.AbpAspNetZeroCoreWebModule, Abp.AspNetZeroCore.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,869 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AspNetCore.AbpAspNetCoreModule, Abp.AspNetCore, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,870 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebCommonModule, Abp.Web.Common, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,870 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AspNetCore.SignalR.AbpAspNetCoreSignalRModule, Abp.AspNetCore.SignalR, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,871 [1 ] Abp.Modules.AbpModuleManager - Loaded module: SysApp.Startup.SysAppGraphQLModule, SysApp.GraphQL, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,871 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Runtime.Caching.Redis.AbpRedisCacheModule, Abp.RedisCache, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,871 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Hangfire.AbpHangfireAspNetCoreModule, Abp.HangFire.AspNetCore, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2020-09-01 12:09:53,876 [1 ] Abp.Modules.AbpModuleManager - 20 modules loaded. DEBUG 2020-09-01 12:09:56,710 [1 ] Abp.Localization.LocalizationManager - Initializing 4 localization sources. DEBUG 2020-09-01 12:09:56,813 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: Abp DEBUG 2020-09-01 12:09:56,847 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpZero DEBUG 2020-09-01 12:09:56,954 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: SysApp DEBUG 2020-09-01 12:09:56,967 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpWeb DEBUG 2020-09-01 12:09:57,109 [1 ] Abp.AutoMapper.AbpAutoMapperModule - Found 6 classes define auto mapping attributes DEBUG 2020-09-01 12:09:57,109 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SysApp.Web.Models.TokenAuth.ExternalLoginProviderInfoModel DEBUG 2020-09-01 12:09:57,120 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SysApp.Friendships.Cache.FriendCacheItem DEBUG 2020-09-01 12:09:57,121 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SysApp.Dto.OrganizationUnitDto DEBUG 2020-09-01 12:09:57,121 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SysApp.Dto.RoleDto DEBUG 2020-09-01 12:09:57,122 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SysApp.Dto.UserDto+RoleDto DEBUG 2020-09-01 12:09:57,122 [1 ] Abp.AutoMapper.AbpAutoMapperModule - SysApp.Dto.UserDto+OrganizationUnitDto INFO 2020-09-01 12:09:58,373 [1 ] tCore.Builder.RequestLocalizationOptions - Supported Request Localization Cultures: DEBUG 2020-09-01 12:09:58,538 [4 ] oCore.Licensing.AspNetZeroLicenseChecker - C:\Users\user\AppData\Local\Temp\780259b9053d06f00fb8842b405680a6.tmp INFO 2020-09-01 12:09:59,416 [1 ] taProtection.KeyManagement.XmlKeyManager - User profile is available. Using 'C:\Users\user\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. INFO 2020-09-01 12:09:59,557 [8 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:45776/
ERROR 2020-09-01 12:09:59,579 [8 ] AspNetCore.Server.IIS.Core.IISHttpServer - Connection ID "18230571310386250338", Request ID "80000263-0004-fd00-b63f-84710c7967bb": An unhandled exception was thrown by the application. Castle.MicroKernel.Handlers.HandlerException: Can't create component 'Abp.MultiTenancy.TenantCache`2[[SysApp.MultiTenancy.Tenant, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null],[SysApp.Authorization.Users.User, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null]]' as it has dependencies to be satisfied.'Abp.MultiTenancy.TenantCache`2[[SysApp.MultiTenancy.Tenant, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null],[SysApp.Authorization.Users.User, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null]]' is waiting for the following dependencies:
- Service 'Abp.Domain.Repositories.IRepository`1[[SysApp.MultiTenancy.Tenant, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.
ERROR 2020-09-01 12:30:03,117 [8 ] AspNetCore.Server.IIS.Core.IISHttpServer - Connection ID "18086456113720459586", Request ID "80000143-0002-fb00-b63f-84710c7967bb": An unhandled exception was thrown by the application. Castle.MicroKernel.Handlers.HandlerException: Can't create component 'Abp.MultiTenancy.TenantCache`2[[SysApp.MultiTenancy.Tenant, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null],[SysApp.Authorization.Users.User, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null]]' as it has dependencies to be satisfied.
'Abp.MultiTenancy.TenantCache`2[[SysApp.MultiTenancy.Tenant, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null],[SysApp.Authorization.Users.User, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null]]' is waiting for the following dependencies:
- Service 'Abp.Domain.Repositories.IRepository`1[[SysApp.MultiTenancy.Tenant, SysApp.Core, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.
-
0
Hi @sysberriestechnology
Public and Admin (MVC) websites are not desigend to work that way. We don't know which steps to implement to achive what you want. I think it will be easier for you to create a new project for the public website insted of using the existing one. Becasue removing database connections from the existing one will take more time.