hi
Can you remove the abstract
keyword?
public class SiteRiskIndexAppService :
hi
Why did you add the MyDynamicResourceLocalizer
?
What is its purpose?
Thanks.
hi
Is your problem solved?
Attached is the video for reference
Where is the video?
Thanks.
The issue arises because your application service inherits a generic interface, which the default service cannot recognize.
hi
Can you try to remove [RemoteService(false)]
and add MyAbpHttpClientProxyServiceConvention
to your Blazor
project?
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.Replace(ServiceDescriptor.Transient<IAbpServiceConvention, MyAbpHttpClientProxyServiceConvention>());
context.Services.AddTransient<MyAbpHttpClientProxyServiceConvention>();
}
using System.Linq;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Conventions;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Client.StaticProxying;
using Volo.Abp.Http.Client.Web.Conventions;
using Volo.Abp.Http.Modeling;
using Volo.Abp.Reflection;
namespace SEF.Blazor;
public class MyAbpHttpClientProxyServiceConvention : AbpHttpClientProxyServiceConvention
{
public MyAbpHttpClientProxyServiceConvention(
IOptions<AbpAspNetCoreMvcOptions> options,
IConventionalRouteBuilder conventionalRouteBuilder,
IClientProxyApiDescriptionFinder clientProxyApiDescriptionFinder,
IOptions<AbpHttpClientStaticProxyingOptions> staticProxyingOptions)
: base(options, conventionalRouteBuilder, clientProxyApiDescriptionFinder, staticProxyingOptions)
{
}
protected override ActionApiDescriptionModel? FindActionApiDescriptionModel(ControllerModel controller, ActionModel action)
{
var appServiceType = FindAppServiceInterfaceType(controller);
if (appServiceType == null)
{
return null;
}
var key =
$"{appServiceType.FullName}." +
$"{action.ActionMethod.Name}." +
$"{string.Join("-", action.Parameters.Select(x => TypeHelper.GetFullNameHandlingNullableAndGenerics(x.ParameterType)))}";
var actionApiDescriptionModel = ClientProxyApiDescriptionFinder.FindAction(key);
if (actionApiDescriptionModel == null)
{
return null;
}
return actionApiDescriptionModel;
// if (actionApiDescriptionModel.ImplementFrom!.StartsWith("Volo.Abp.Application.Services"))
// {
// return actionApiDescriptionModel;
// }
// if (appServiceType.FullName != null && actionApiDescriptionModel.ImplementFrom.StartsWith(appServiceType.FullName))
// {
// return actionApiDescriptionModel;
// }
// return null;
}
}
hi
I will provide a solution soon.
Thanks.
hi
I have downloaded your projects. can you also share the steps?
Thanks.