Yes, all users are subscribed. I think the back plane is working. I am now using my own version of SignalRRealTimeNotifier as I think the issue may be here.
Thank you for your reply.
I will have to read up on ABP back ground jobs.
For the backplane, I have a Redis installation and I have simply configured ABP to use it. I haven't made any SignalR changes yet.
private void ConfigureOwinServices(IAppBuilder app)
{
app.Properties["host.AppName"] = "Phone";
app.UseAbp();
// configure SignalR to use Redis backplane
GlobalHost.DependencyResolver.UseRedis(_redisConnString, 6379, "", "PhonePbx");
app.MapSignalR();
}
Then, as per documentation on notifications, I create a notification in AppNotifier class
public async Task IncomingCallAsync(string ddi, string cli)
{
await _notificationPublisher.PublishAsync(
AppNotificationNames.IncomingCall,
new MessageNotificationData($"New incoming phone call to {ddi} from {cli}"),
severity: NotificationSeverity.Success
);
}
I haven't had to change any client side code as this is already built in to ABP/Metronic.
Is this the correct approach. I have a web form behind a load balancer. When I raise a notification I want all clients to receive the notification, which means all servers will have to use SIgnalR to push the notification to their clients.
Hi,
I have an ASP.NET Module Zero application (ASP.NET Core targetting .NET 4.6) that runs on multiple servers. The servers are behind a load balancer.
The application publishes a notification. The application is configured to use Redis (and it's pub/sub model) as a backplane. The idea here is that the notification from the server gets written to the Redis backplane, the Redis backplane then notifies all the other servers (that are Redis subscribers) and the other servers then using the ABP Zero notification system send the notification to all it's connected clients using SignalR.
Publishing the notification is ok and it gets written/published to the Redis backplane. All servers/subscribers get the Redis message ok (I can see it using redis-cli). The problem I have is that only the clients connected to 1 server get a SignalR message to act on (e.g. display a model and update the notification count in the top right corner).
I know this is a needle in a hay stack, but am I missing some obvious configuration step that would cause this?
Thanks
Kevin
Please can you offer me some guidance. I have Ldap Authentication working as per the instructions in the documentation (although I had to update db schema to allow columns AbpUsers.EmailAddress and AbpUsers.NormalizedEmailAddress to be null).
However, I would like to use SSO.
I am using .NET Core. Can you point me in the right direction of any useful resources please?
Thanks
Hi Aaron,
this only seems to be a problem on .NET Core v3.0.0.0. The code fix I suggested is not needed on on the MVC 5.x version bt the UserAppService code looks the same (2 minor differences on .NET core version).
The problem is solved if I use this editted code. Is this a bug or am I doing something wrong?
[AbpAuthorize(AppPermissions.Pages_Administration_Users_Edit)]
protected virtual async Task UpdateUserAsync(CreateOrUpdateUserInput input)
{
Debug.Assert(input.User.Id != null, "input.User.Id should be set.");
var user = await UserManager.FindByIdAsync(input.User.Id.Value);
//////// THIS VARIABLE IS NEW
var originalPassword = user.Password;
//Update user properties
input.User.MapTo(user); //Passwords is not mapped (see mapping configuration)
if (input.SetRandomPassword)
{
input.User.Password = User.CreateRandomPassword();
}
//////// THE 'ELSE' KEYWORD IS NEW
else if (!input.User.Password.IsNullOrEmpty())
{
CheckErrors(await UserManager.ChangePasswordAsync(user, input.User.Password));
}
//////// THIS ELSE BLOCK IS NEW
else
{
user.Password = originalPassword;
}
CheckErrors(await UserManager.UpdateAsync(user));
//Update roles
CheckErrors(await UserManager.SetRoles(user, input.AssignedRoleNames));
if (input.SendActivationEmail)
{
user.SetNewEmailConfirmationCode();
await _userEmailer.SendEmailActivationLinkAsync(user, input.User.Password);
}
}
Apologies, it is executed. The debugger does not hit the break points but I have added some log statements and these get written to the log file. For example:
DEBUG 2017-10-04 15:46:06,130 [25 ] CustomDtoMapper - Entered method CreateMappingsInternal
The CustomDtoMapper does not appear to be executed.
It definitely maps. Here is my current code for reference:
protected virtual async Task UpdateUserAsync(CreateOrUpdateUserInput input)
{
Debug.Assert(input.User.Id != null, "input.User.Id should be set.");
var user = await UserManager.FindByIdAsync(input.User.Id.Value);
//var originalPassword = user.Password;
//Update user properties
//input.User.MapTo(user); //Passwords is not mapped (see mapping configuration)
////////// PROVIDE A FAKE PASSWORD AND SEE IF IT MAPS
input.User.Password = "ThisIsFake-WillItMap";
//////////CODE SUGGESTED BY ARRON
ObjectMapper.Map(input.User, user);
//////////BREAKPOINT HERE AND REVIEW
Debug.Assert(user.Password.Equals(input.User.Password), "Password did not map.");
if (input.SetRandomPassword)
{
input.User.Password = User.CreateRandomPassword();
}
if (!input.User.Password.IsNullOrEmpty())
{
CheckErrors(await UserManager.ChangePasswordAsync(user, input.User.Password));
}
//else
//{
// user.Password = originalPassword;
//}
CheckErrors(await UserManager.UpdateAsync(user));
//Update roles
CheckErrors(await UserManager.SetRoles(user, input.AssignedRoleNames));
if (input.SendActivationEmail)
{
user.SetNewEmailConfirmationCode();
await _userEmailer.SendEmailActivationLinkAsync(user, input.User.Password);
}
}
HI Arron,
yes I tried it in my debugger. Using your method does map the password. I will double check now though.