hi
I think you can try to override the HeaderViewComponent
of Lepton
.
abp\lepton-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton\Themes\Lepton\Components\Header\MainNavbarBrandViewComponent.cs
abp\lepton-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton\Themes\Lepton\Components\Header\Default.cshtml
hi
You can custom the MenuManager
service to order the menus.
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs#L46
HI
Can you try to add typeof(IIdentityUserAppService)
to ExposeServices
attribute?
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IdentityUserAppService), typeof(IIdentityUserAppService))]
public class CustomIdentityUserAppService : IdentityUserAppService
Solution before upgrade:
Use MyAbpValidationActionFilter
to replace the build-in AbpValidationActionFilter
.
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.Validation;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Reflection;
using Volo.Abp.Validation;
namespace MyCompanyName.MyProjectName.Web
{
public class MyAbpValidationActionFilter : IAsyncActionFilter, ITransientDependency
{
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
{
if (!context.ActionDescriptor.IsControllerAction() ||
!context.ActionDescriptor.HasObjectResult())
{
await next();
return;
}
if (ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault<DisableValidationAttribute>(context.ActionDescriptor.GetMethodInfo()) != null)
{
await next();
return;
}
if (ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault<DisableValidationAttribute>(context.Controller.GetType()) != null)
{
await next();
return;
}
if (context.ActionDescriptor.GetMethodInfo().DeclaringType != context.Controller.GetType())
{
var baseMethod = context.ActionDescriptor.GetMethodInfo();
var overrideMethod = context.Controller.GetType().GetMethods().FirstOrDefault(x =>
x.DeclaringType == context.Controller.GetType() &&
x.Name == baseMethod.Name &&
x.ReturnType == baseMethod.ReturnType &&
x.GetParameters().Select(p => p.ToString()).SequenceEqual(baseMethod.GetParameters().Select(p => p.ToString())));
if (overrideMethod != null)
{
if (ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault<DisableValidationAttribute>(overrideMethod) != null)
{
await next();
return;
}
}
}
context.HttpContext.RequestServices.GetRequiredService<IModelStateValidator>().Validate(context.ModelState);
await next();
}
}
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
PostConfigure<MvcOptions>(mvcOptions =>
{
mvcOptions.Filters.ReplaceOne(
x => (x as ServiceFilterAttribute)?.ServiceType == typeof(AbpValidationActionFilter),
new ServiceFilterAttribute(typeof(MyAbpValidationActionFilter)));
});
}
hi
Those code are unnecessary. the email module will get the configuration automatically.
https://docs.abp.io/en/abp/latest/Emailing
This is test program, You can use it to confirm your email setting is correct.
https://github.com/abpframework/abp-samples/blob/master/EmailSendDemo/src/EmailSendDemo/Program.cs#L11
You can inject the ICurrentUser service and use IsAuthenticated to check the user whatever is logged.
hi
You can give it a try. I think it will be works.
Like your example website, it automatically jumps to the login page.
The demo website is angular. You are using Blazor Server.
Please confirm your email config is correct.
https://github.com/abpframework/abp-samples/blob/master/EmailSendDemo/src/EmailSendDemo/Program.cs#L11
HI
Please use this demo to check your mail config.
https://github.com/abpframework/abp-samples/tree/master/EmailSendDemo