I have 3 topics and 3 subscriptions. how to configure in appsettings json. i want to configure in existing below format. { "Azure": { "ServiceBus": { "Connections": { "Default": { "ConnectionString": "Endpoint=sb://sb-my-app.servicebus.windows.net/;SharedAccessKeyName={{Policy Name}};SharedAccessKey={};EntityPath=marketing-consent" } } }, "EventBus": { "ConnectionName": "Default", "SubscriberName": "MySubscriberName", "TopicName": "MyTopicName" } } }
My openaiconfiguration api is returning all the permissions as true but in the database and in the AbpPermissionGrants table the permission does not exist. This is causing the issue in my Angular front end to hide or show a button
Host terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.EventBus.Azure.AbpEventBusAzureModule, Volo.Abp.EventBus.Azure, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null: Value cannot be null. (Parameter 'topicName'). See the inner exception for details. ---> System.ArgumentNullException: Value cannot be null. (Parameter 'topicName') at Volo.Abp.Check.NotNull[T](T value, String parameterName) at Volo.Abp.AzureServiceBus.AzureServiceBusMessageConsumer.Initialize(String topicName, String subscriptionName, String connectionName) at Volo.Abp.AzureServiceBus.AzureServiceBusMessageConsumerFactory.CreateMessageConsumer(String topicName, String subscriptionName, String connectionName) at Volo.Abp.EventBus.Azure.AzureDistributedEventBus.Initialize() at Volo.Abp.EventBus.Azure.AbpEventBusAzureModule.OnApplicationInitialization(ApplicationInitializationContext context) at Volo.Abp.Modularity.AbpModule.OnApplicationInitializationAsync(ApplicationInitializationContext context) at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.InitializeAsync(ApplicationInitializationContext context, IAbpModule module) at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitializationContext context) --- End of inner exception stack trace --- at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitializationContext context) at Volo.Abp.AbpApplicationBase.InitializeModulesAsync() at Volo.Abp.AbpApplicationWithExternalServiceProvider.InitializeAsync(IServiceProvider serviceProvider) at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApplicationAsync(IApplicationBuilder app)
Hi,
We have 3 modular APIs (1 API,2 API,3 API) and we are trying to call (through remote service call) 2 modulars layered api (2 and 3 API) from single layer modular api (1 API). When all these modular APIs were developed in ABP 9, it was working fine. After upgrading to all the modular API from 9 to 10, we are getting 403 forbidden issue when calling the remote service.
The token is generating properly and infact the 2 modular layered api also returning the data but when we try to call from modular single layer api, it is throwing forbidden error. We looked at all the permissions and it looks fine.
Please help us to resolve the issue
We are seeing issue in ABP forms module, when we try to create forms or view form, we see error in UI (some Json related issue). We need an immediate fixfor this as we are going live in 2 days.
Also, we have added a MVC sub-module(which contains ABP forms) in our main angular module and when we try to access this forms module, even though we are logged in, sometimes it still asks for loggin again. Apart from this, we face issue with tenant login as well in forms module.
Hon.IFS.SiteManagement.EntityFrameworkCore.Domains.Contacts.ContactRepositoryTests.GetListAsync Source: ContactRepositoryTests.cs line 21 Duration: 1 ms
Message: Volo.Abp.AbpInitializationException : An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Hon.IFS.SiteManagement.SiteManagementTestBaseModule, Hon.IFS.SiteManagement.TestBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: Object reference not set to an instance of an object.. See the inner exception for details. ---- System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
ModuleManager.InitializeModules(ApplicationInitializationContext context)
AbpApplicationBase.InitializeModules()
AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider)
AbpIntegratedTest1.ctor() SiteManagementTestBase1.ctor()
SiteManagementEntityFrameworkCoreTestBase.ctor()
ContactRepositoryTests.ctor() line 14
RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
----- Inner Stack Trace -----
SiteManagementDataSeedContributor.SeedAsync(DataSeedContext context) line 58
<11 more frames...>
ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
TaskExtensions.WaitAndUnwrapException(Task task)
AsyncContext.Run(Func1 action) AsyncHelper.RunSync(Func1 action)
SiteManagementTestBaseModule.SeedTestData(ApplicationInitializationContext context) line 32
SiteManagementTestBaseModule.OnApplicationInitialization(ApplicationInitializationContext context) line 27
OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module)
ModuleManager.InitializeModules(ApplicationInitializationContext context)
[RemoteService(IsEnabled = false)] public abstract class SendGridEmailNotificationAppServiceBase : SiteHostAppService { protected IEmailSender _emailSender; private readonly ITemplateRenderer _templateRenderer; private readonly Microsoft.Extensions.Configuration.IConfiguration _configuration; private readonly ITenantRepository _tenantRepository; private readonly ICurrentTenant _currentTenant; private readonly IStringEncryptionService _stringEncryption;
public SendGridEmailNotificationAppServiceBase(IEmailSender emailSender, ITemplateRenderer templateRenderer,
Microsoft.Extensions.Configuration.IConfiguration configuration, ITenantRepository tenantRepository, ICurrentTenant currentTenant, IStringEncryptionService stringEncryption)
{
_emailSender = emailSender;
_templateRenderer = templateRenderer;
_configuration = configuration;
_tenantRepository = tenantRepository;
_currentTenant = currentTenant;
_stringEncryption = stringEncryption;
}
public virtual async Task EmailNotification(SendGridEmailNotificationDto input)
{
string emailBody = null!;
input.BaseSiteUrl = _configuration["App:SelfUrl"]?.Trim();
try
{
if (input.MailSubject.Equals("CHANGEPASSWORD", StringComparison.InvariantCultureIgnoreCase))
{
input.MailSubject = "Your Password Has Been Successfully Changed";
var model = new ChangePasswordModel
{
Name = input.Name,
Url = input.BaseSiteUrl + "/Account/login",
Type = input.Type,
TenantName = input.TenantName
};
model.setCurrentDateTime();
emailBody = await LoadTemplate("ChangePassword.tpl", model);
}
else if (input.MailSubject.Equals("NEWUSERCREATED", StringComparison.InvariantCultureIgnoreCase))
{
input.MailSubject = "Your IFS Account Details and Next Steps";
var angularUrl = _configuration["App:SelfUrl"]?.Trim()?.TrimEnd('/');
if (string.IsNullOrEmpty(angularUrl))
{
throw new InvalidOperationException("App:AngularUrl is not set in configuration.");
}
string tenantHostName = await GetTenantHostNameAsync();
string navigationUrl;
if (_currentTenant.Id.HasValue)
{
string encryptedtenantHostName = _stringEncryption.Encrypt(tenantHostName);
navigationUrl = $"{angularUrl}/Account/Login?tenantName={Uri.EscapeDataString(encryptedtenantHostName)}";
}
else
{
navigationUrl = $"{angularUrl}/Account/Login";
}
var model = new UserCreationModel
{
Email = input.MailTo,
Username = input.Username,
Name = input.Name,
TenantId = input.TenantId,
UserId = input.Id,
Password = input.Password,
Url = navigationUrl
};
emailBody = await LoadTemplate("UserCreation.tpl", model);
}
else
{
throw new UserFriendlyException("Unsupported email subject type.");
}
await _emailSender.SendAsync(
to: input.MailTo,
subject: input.MailSubject,
body: emailBody,
isBodyHtml: input.IsBodyHtml
);
}
catch (Exception ex)
{
Logger.LogError(ex, "An error occurred while sending the email notification.");
throw new UserFriendlyException($"Failed to send the email. Reason: {ex.Message}. Please try again later.");
}
}
private async Task<string> LoadTemplate(string templateName, object model)
{
string renderedContent = null!;
try
{
if (string.IsNullOrWhiteSpace(templateName))
{
throw new UserFriendlyException("Template name is invalid.");
}
string templateDirectory;
var isDevEnv = Convert.ToBoolean(_configuration["IsDevEnv"] ?? "false");
templateDirectory = isDevEnv
? Path.Combine(Directory.GetCurrentDirectory(), "Emailing", "Templates")
: Path.Combine(AppContext.BaseDirectory, "Emailing", "Templates");
string templatePath = Path.Combine(templateDirectory, templateName);
if (!File.Exists(templatePath))
{
throw new FileNotFoundException($"Email template not found at path: {templatePath}");
}
var templateContent = await File.ReadAllTextAsync(templatePath);
// Apply replacements based on template name
if (templateName.Equals("UserCreation.tpl", StringComparison.OrdinalIgnoreCase) && model is UserCreationModel userModel)
{
renderedContent = templateContent
.Replace("{{model.Name}}", userModel.Name)
.Replace("{{model.Email}}", userModel.Email)
.Replace("{{model.Username}}", userModel.Username)
.Replace("{{model.Password}}", userModel.Password)
.Replace("{{model.Url}}", userModel.Url);
}
else if (templateName.Equals("ChangePassword.tpl", StringComparison.OrdinalIgnoreCase) && model is ChangePasswordModel passwordModel)
{
renderedContent = templateContent
.Replace("{{model.Name}}", passwordModel.Name)
.Replace("{{model.Date}}", passwordModel.Date.ToString("MMMM d, yyyy 'at' h:mm tt"))
.Replace("{{model.TenantName}}",passwordModel.TenantName)
.Replace("{{model.Url}}", passwordModel.Url);
}
else
{
throw new UserFriendlyException($"Unsupported template or model type for: {templateName}");
}
return renderedContent;
}
catch (Exception ex)
{
Logger.LogInformation(renderedContent);
Logger.LogError(ex, $"Failed to load or process email template: {templateName}");
throw new UserFriendlyException($"An error occurred while preparing the email content. --> {ex.Message}");
}
}
private async Task<string> GetTenantHostNameAsync()
{
string tenantHostName = "default";
if (_currentTenant.Id.HasValue)
{
var tenant = await _tenantRepository.FindAsync(_currentTenant.Id.Value);
if (tenant?.ExtraProperties.TryGetValue("tenantHostName", out var hostNameObj) == true)
{
tenantHostName = hostNameObj?.ToString() ?? tenantHostName;
}
}
return tenantHostName;
}
" private async Task<string> RenderEmailBodyAsync(string templateName, object model) { string renderedBody = null!; try { // Render the email body using the template renderer renderedBody = await _templateRenderer.RenderAsync(templateName, model); return renderedBody; } catch (Exception ex) { // Log the error and rethrow a user-friendly exception //Logger.LogError(ex, $"Failed to render email template: {templateName}"); throw new UserFriendlyException($"renderedBody string = {renderedBody} --> {ex.ToString()} for template {templateName} An error occurred while preparing the email content."); }" }
}
Hi,
We have 2 host applications (Host 1 and Host 2). Both have their respective Document Management Module 1 -> Host 1 and Document Management Module 2 -> Host 2. I would like to leverage the Document Management Module 1 in Host 1 and Host 2 rather than creating 2 different modules like above statement.
Unable to generate the ABP Elsa Pro domain entities after integrating with Modular API solution. Please share the step by step documentation
Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration button.
Hi,
I am unable to create proxy and angular components for newly created entities via ABP suite. This is a completely new module under one host application and another module under the same host application, we do not see the these issues.
Appreciate for the quick response.
Please let me know if any logs required to analyze it.
Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration button.