Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "bilalhaidar"

Thank you for your responses.

@strix20: What is the suggestion on Azure, what to use? BLOB storage?

@ismcagdas Is there a plan to make the ASPNETZERO compatible more with Azure?

Thanks

For anyone in the same situation as mine. I found a way out.

In the VSTS Build Definition, select .csproj instead of .sln. This way, only the project you want to build, will be built, others won't!

This works like a charm. If you need help while doing this step, ping me here. I will be glad to help.

Thanks Bilal

Thank you Ismail for your quick response. That was it, and here is the code I used and it works in case someone needs it:

var pages = context.GetPermissionOrNull(AgencyPermissions.Pages);
            var common = pages.Children.Where( permission => permission.Name.Equals(AgencyPermissions.Common, System.StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
            
            if (common == null)
            {
                return;
            }

Sure. I'll send you the project via email.

Thanks for your assistance.

Hello, I tried both codes below. Still nothing is saved in the AbpUserNotifications :(

I am also attaching to you a snapshot from the SQL Profiler. It shows no commands to SQL to actually insert a new record into the AbpUserNotifications.

Can I debug the Notification engine from my machine and see whats happening?

public async Task NotifyUser()
        {
            using (_unitOfWorkManager.Begin())
            {
                using (_session.Use(1, null))
                {
                    var user = _userManager.Users.Where(u => u.Id == 2).FirstOrDefault();
                    await _appNotifier.SendMessageAsync(user.ToUserIdentifier(), $"Testing HangFire {user.FullName}", Abp.Notifications.NotificationSeverity.Success);
                }
            }
        }

And

public async Task NotifyUser()
        {
            using (_unitOfWorkManager.Begin())
            {
                using (_session.Use(1, 2))
                {
                    var user = _userManager.Users.Where(u => u.Id == 2).FirstOrDefault();
                    await _appNotifier.SendMessageAsync(user.ToUserIdentifier(), $"Testing HangFire {user.FullName}", Abp.Notifications.NotificationSeverity.Success);
                }
            }
        }

This could help: <a class="postlink" href="http://docs.hangfire.io/en/latest/configuration/using-dashboard.html">http://docs.hangfire.io/en/latest/confi ... board.html</a>

It says, with ASP.NET Core, you can create a new class that implements IDashboardAuthorizationFilter. Inside that code you can check on permissions I believe to see if you can access or not.

Hello @ismcagdas,

The notifications are sent down to the user correctly using both toastr and Desktop notification. The only problem is that they don't appear in the header notification bar as new notifications because it seems they are not being stored in the DB.

Is there any configuration needed to allow notifications to be stored in the DB?

The code below to retrieve user works fine and I am able to get the user object and also showing the Full Name and it works.

await _appNotifier.SendMessageAsync(user.ToUserIdentifier(), $"Testing HangFire {user.FullName}", Abp.Notifications.NotificationSeverity.Success);

The AbpUserNotifications is always not showing those notifications as they are not stored.

(I hard coded the value here because I couldn't get the user object from the AbpSession, it is always null for some reason)

Oh thanks a lot! I thought I need to download a new project template again. I will give this a try.

Thanks

You made sure the Web API is working fine and no problems with the logic / db access?

Hello I use the same project template.

The way I use it as follows: 1- Run the server-side application (in debug or not in debug doesn't matter) 2- Go to the angular app, on the command go to nswag folder and then type "refresh.bat" 3- The proxies should be generated now

One thing that happens to me is that, I am using VS Code, so every time I run refres.bat, I have to close VS Code and open it again. then I will be able to see all new and updated proxies.

Try it

HTH

Showing 41 to 50 of 461 entries