I am running microservice on docker with a bridge network. Using HttpContextAccessor.HttpContext.Connection.RemoteIpAddress.ToString(), and it return the bridge gateway.
How to get the correct client ip address?
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
If you're creating a bug/problem report, please include followings:
If login success, the cookies will be like that.
If the problem show up, cookies will be
If you want keep producing the issue, you can delete the record in AbpUserLogins table and login again.
It only occur when running on IIS. If using dotnet run in localhost, no such issue occur.
How to render the latest Text templating content?
After editing the TextTemplate content, we use the _templateRenderer.RenderAsync method which return the default content.
Which method should we use to get the updated content?
If we change to static Client Proxies using the CLI abp generate-proxy -t csharp -u https://localhost:44741 -m NotificationService which https://localhost:44741 is new NotificationService, problem can be solved.
[DependsOn(
typeof(NotificationServiceApplicationContractsModule),
typeof(AbpHttpClientModule))]
public class NotificationServiceHttpApiClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddStaticHttpClientProxies(typeof(NotificationServiceApplicationContractsModule).Assembly,
NotificationServiceRemoteServiceConsts.RemoteServiceName);
// context.Services.AddHttpClientProxies(
// typeof(NotificationServiceApplicationContractsModule).Assembly,
// NotificationServiceRemoteServiceConsts.RemoteServiceName
// );
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<NotificationServiceHttpApiClientModule>();
});
}
}
Sine the generated templated using dynamic proxy, can we use dynamic Client Proxies?