ABP Framework version: v7.4.0 UI Type: Angular Database System: EF Core (SQL Server)
We are trying to update a resource using Put http method endpoint. Suppose the resource behind the PUT endpoint is having 15 fields and we send 5 fields to be updated from front end then what it is doing is that it is updating those 5 fields only and making other fields to null. It should not touch remaining 10 fields as of now its making all of them to default or null. Can you let me know how to change or modify it if it can be changed.
Thanks.
ABP Framework version: v7.4.4 UI Type: Angular Database System: EF Core (SQL Server)
I have controller which is calling the service
public class ContactInformationsAppService : ApplicationService, IContactInformationsAppService
{
[Authorize(ClientsPermissions.ContactInformations.Create)]
public virtual async Task<ContactInformationDto> CreateAsync(ContactInformationCreateDto input)
{
if (await _contactInformationManager.checkContactExist(input.Email))
{
throw new UserFriendlyException("email {0} already exists", input.Email);
}
var contactInformation = await _contactInformationManager.CreateAsync(
input.ClientInfomationIds, input.ContactTypeId, input.ProvinceTypeId, input.FirstName, input.LastName, input.PhoneNumber, input.PreferredContactWay, input.IsIndemnitor, input.Percentage, input.CellNumber, input.FaxNumber, input.Email, input.Notes, input.MailingAddress, input.City, input.PostalCode, input.BusinessAddress, input.Website, input.Company, input.Description, input.ContactCode, input.AlternateEmail
);
return ObjectMapper.Map<ContactInformation, ContactInformationDto>(contactInformation);
}
}
// controller method
public class ContactInformationController : AbpController, IContactInformationsAppService
{ private readonly IContactInformationsAppService _contactInformationsAppService;
[HttpPost]
public virtual Task<ContactInformationDto> CreateAsync(ContactInformationCreateDto input)
{
return _contactInformationsAppService.CreateAsync(input);
}
}
How can i return the message to the consumer that Contact was not created because email already exists. Since the return type Task<ContactINformationDTO> i am not able to set the request as bad request and also how can we return a response from service to controller and then controller to consumer that email does not exist.
Thanks
We were looking for having a richtext editor in angular app so that user can format the text inside it (Bold, underline,Italics,List, table ) same as you guys having in this website while adding a question. we were looking in this documentation link but could not find such control how can we have this kind of input control,please share us any link how can we achieve this.
Production ABP Framework version: v7.4.0 UI Type: Angular Database System: EF Core (SQL Server) .net 7 is .framework.IIS 1 on windows server 2019 Data center
We tried to use background job in api.host project but ended up in volo.abp.core 8.0.0 error while configuring the services in api.host project. here is the error stack trace
HTTP Error 500.30 - ASP.NET Core app failed to start
System.IO.FileNotFoundException: Could not load file or assembly 'Volo.Abp.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Volo.Abp.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.Reflection.CustomAttribute.\_CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte\*\* ppBlob, Byte\* pEndBlob, Int32\* pcNamedArgs)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
at Volo.Abp.Modularity.AbpModuleHelper.FindDependedModuleTypes(Type moduleType)
at Volo.Abp.Modularity.AbpModuleHelper.AddModuleAndDependenciesRecursively(List`1 moduleTypes, Type moduleType, ILogger logger, Int32 depth) at Volo.Abp.Modularity.AbpModuleHelper.AddModuleAndDependenciesRecursively(List`1 moduleTypes, Type moduleType, ILogger logger, Int32 depth)
at Volo.Abp.Modularity.AbpModuleHelper.AddModuleAndDependenciesRecursively(List`1 moduleTypes, Type moduleType, ILogger logger, Int32 depth) at Volo.Abp.Modularity.AbpModuleHelper.AddModuleAndDependenciesRecursively(List`1 moduleTypes, Type moduleType, ILogger logger, Int32 depth)
at Volo.Abp.Modularity.AbpModuleHelper.AddModuleAndDependenciesRecursively(List`1 moduleTypes, Type moduleType, ILogger logger, Int32 depth) at Volo.Abp.Modularity.AbpModuleHelper.AddModuleAndDependenciesRecursively(List`1 moduleTypes, Type moduleType, ILogger logger, Int32 depth)
at Volo.Abp.Modularity.AbpModuleHelper.FindAllModuleTypes(Type startupModuleType, ILogger logger)
at Volo.Abp.Modularity.ModuleLoader.FillModules(List`1 modules, IServiceCollection services, Type startupModuleType, PlugInSourceList plugInSources) at Volo.Abp.Modularity.ModuleLoader.GetDescriptors(IServiceCollection services, Type startupModuleType, PlugInSourceList plugInSources) at Volo.Abp.Modularity.ModuleLoader.LoadModules(IServiceCollection services, Type startupModuleType, PlugInSourceList plugInSources) at Volo.Abp.AbpApplicationBase.LoadModules(IServiceCollection services, AbpApplicationCreationOptions options) at Volo.Abp.AbpApplicationBase..ctor(Type startupModuleType, IServiceCollection services, Action`1 optionsAction)
at Volo.Abp.AbpApplicationWithExternalServiceProvider..ctor(Type startupModuleType, IServiceCollection services, Action`1 optionsAction) at Volo.Abp.AbpApplicationFactory.Create(Type startupModuleType, IServiceCollection services, Action`1 optionsAction)
at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction) at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Microsoft\.Extensions\.DependencyInjection\.WebApplicationBuilderExtensions\.AddApplicationAsync\[TStartupModule\]\(WebApplicationBuilder builder\, Action\`1 optionsAction\)
at Wbi.Program.Main(String[] args) in /home/BUILD/wbidevapi.essentialdemo.com/wbibackend/src/Wbi.HttpApi.Host/Program.cs:line 41
Also we tried to mimic same error on local IIS (window 10 pro) but it was also giving same error code. but different error stack HTTP Error 500.30 - ASP.NET Core app failed to start
2023-11-29 14:01:28.508 +05:30 [FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Wbi.WbiHttpApiHostModule, Wbi.HttpApi.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
\-\-\-\> System\.NullReferenceException: Object reference not set to an instance of an object\.
at Microsoft.Extensions.DependencyInjection.AbpSwaggerGenServiceCollectionExtensions.AddAbpSwaggerGenWithOAuth(IServiceCollection services, String authority, Dictionary`2 scopes, Action`1 setupAction, String authorizationEndpoint, String tokenEndpoint)
at Wbi.WbiHttpApiHostModule.ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration) in D:\Work\orionProjects\WBI\code\aspnet-core\src\Wbi.HttpApi.Host\WbiHttpApiHostModule.cs:line 292
at Wbi.WbiHttpApiHostModule.ConfigureServices(ServiceConfigurationContext context) in D:\Work\orionProjects\WBI\code\aspnet-core\src\Wbi.HttpApi.Host\WbiHttpApiHostModule.cs:line 212
at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
\-\-\- End of inner exception stack trace \-\-\-
at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction) at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Microsoft\.Extensions\.DependencyInjection\.WebApplicationBuilderExtensions\.AddApplicationAsync\[TStartupModule\]\(WebApplicationBuilder builder\, Action\`1 optionsAction\)
at Wbi.Program.Main(String[] args) in D:\Work\orionProjects\WBI\code\aspnet-core\src\Wbi.HttpApi.Host\Program.cs:line 41
we commented configure swagger it resulted in this error
2023-11-29 15:51:50.255 +05:30 [INF] Starting Wbi.HttpApi.Host.
2023-11-29 15:51:52.010 +05:30 [FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=7.4.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
\-\-\-\> System\.Security\.Cryptography\.CryptographicException: The specified network password is not correct\.
at System.Security.Cryptography.X509Certificates.CertificatePal.FilterPFXStore(ReadOnlySpan`1 rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags) at System.Security.Cryptography.X509Certificates.CertificatePal.FromBlobOrFile(ReadOnlySpan`1 rawData, String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(Byte[] rawData, String password, X509KeyStorageFlags keyStorageFlags)
at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate(X500DistinguishedName subject)
at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate()
at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.<>c\_\_DisplayClass1\_0.b\_\_0(OpenIddictServerBuilder builder)
at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action`1 configuration) at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.AddOpenIddictServer(IServiceCollection services) at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context) at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context) at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() --- End of inner exception stack trace --- at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction) at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
at Wbi.Program.Main(String[] args)
I have added CMS kit module to the project. I can access it on the admin side and created pages for terms and conditions and about us. These are just informational pages and should be accessible to user without login. But at present, these are not accessible without login.
Also, in future, I am going to add more dynamic MVC pages (not through CMS) , which can be accessible by guest user. I need to know how I can disable authentication for those pages.
Hi,
I'm using LeptonX theme with .net and angular, it takes around 5-9 seconds to redirect from login to home page. There are 62 requests going on. Might be these are taking time. Can caching help in reducing this time or suggest any other solution which might reduce this redirection time. Attached the screenshot of the requests and the time
Thank you
We are using Application template with Angular as frontend for our application.
we want to show loader when a user tries to log in on API/authorize/connect ui presented by API and on all pages in angular where we are doing proxy calls to api.
We tried to user [abpLoading]="isLoading" directive but not working. as per this url https://support.abp.io/QA/Questions/1203/Angular-UI-blocking-page-mechanism-during--loading--saving
Thanks