Base solution for your next web application

Activities of "tbentley"

I think I have found part of the problem. Many months ago I added the option for Swagger options.CustomSchemaIds(type => type.FullName); as I was getting and error casued by a third party class that had some of the same name for entites that I had. This appended information to the name to make it unique. I am not sure why though it is now appending all the extra information and causing the erro. For now I have removed the CustomerSchemaIds option and just renamed my entities.

Not that I remember. I did upgrade Postman recently - not sure if that would do anything with Swashbuckle. When I scroll down to the bottom of the Swagger web page, I see the same issue of the extraneous information in the Schemas

I am running AspNet Zero version 10.3.0 Angular version I have been using the framework very successfully for many years Yesterday I created a new service and added it to the service-proxy.module.ts as required I then ran the nswag refresh.bat to autogenerate the service-proxies.ts, and then did an npm start on the angular project, I got a bunch of errors of the type:

**> Error: ./src/app/admin/tenants/tenants.component.ts 421:50-66

"export 'EntityDtoOfInt64' was not found in '@shared/service-proxies/service-proxies'

Error: ./src/app/admin/maintenance/maintenance.component.ts 80:26-43 "export 'EntityDtoOfString' was not found in '@shared/service-proxies/service-proxies'

Error: ./src/app/shared/layout/nav/menu-search-bar/menu-search-bar.component.ts 47:33-50 "export 'NameValueOfString' was not found in '@shared/service-proxies/service-proxies'

Error: ./src/app/admin/webhook-subscription/create-or-edit-webhook-subscription-modal.component.ts 147:76-93 "export 'NameValueOfString' was not found in '@shared/service-proxies/service-proxies'

Error: ./src/app/admin/webhook-subscription/create-or-edit-webhook-subscription-modal.component.ts 191:60-77 "export 'NameValueOfString' was not found in '@shared/service-proxies/service-proxies'**

When I look at the generated service-proxies for the members raising errors and they all have extra characters in the name. For example the EntityDtoOfString is now EntityDto_1OfOfStringAndCoreLibAnd_0AndCulture_neutralAndPublicKeyToken_7cec85d7bea7798e as can be seen from the snippet below.

 /**
     * @param body (optional) 
     * @return Success
     */
    clearCache(body: EntityDto_1OfOfStringAndCoreLibAnd_0AndCulture_neutralAndPublicKeyToken_7cec85d7bea7798e | undefined): Observable<void> {
        let url_ = this.baseUrl + "/api/services/app/Caching/ClearCache";
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(body);

How can I fix the corrupted service-proxies.ts?. I have tried deleting it and regenerating it multiple times.

Thanks... Terry

I am using 10.3.0 with angular

I have used the webhook publisher quite a bit but I am now trying to use the webhook publisher to send api requests to a thrid party that requires me to send a JWT as a token on the "Authorization : Bearer" header. I can add a static headerby specifying it in the AbpWebhookSubscription but I don't see an option to add a dynamic header in the PublishAsync so how do I do this.

Thanks... Terry

Thanks, that helped. Rather than worrying about the current online users I just, for now, did a broadcast message and it worked!! It is not as secure but the payload is not really confidential and the client would still need to have the credentials to the Azure SignalR connection.

I'm using AspNetZero version 10.3.0 I have been using the Server and angular client for about a year now (previous project for about 6 years)

I would now like to create a console app that uses the AzureSignalR to pass data back and forth real-time.

I have followed a lot of online samples and have a console app communicating with my AzureSignalR.

The problem I am having is getting the online clients. I have, as a test, in my DispatchAppService.cs

    public async Task SendMessage(string message)
    {

        var onlineClients = _onlineClientManager.GetAllClients();

        await _dispatchCommunicator.SendMessage(onlineClients, message);
    }

but the onlineClients never has any clients even when I have sign on with the angular CLient. How can I see and send data to the console app client?

Thanks... Terry

Thanks. I gave up and just put the chart in a separate page by itself rather than as a tab in an existing page and it appears properly. I think it may have had something to do with a tabset in a tabset?

I am running ASPNetZero v9.0.1.0 with Angular

I have created a customizable dashboard with a single widget - a stacked line graph

I have it as the third tab in a tabset. When I click on the tab, the dashboard is blank until I resize the window. It will appear even if I just adjust the width or height by a few pixels. This happens on both Chrome and Edge.

I can then tab off the dashboard tab and then back on, it will appear but if I select a different menu item and then come back to this tab, it is gone again.

So strange. Does anyone know what is going on and how to fix it?

Thanks... Terry

Thank you for your help. I was able to resolve the issue.

There were actually two things I needed to correct the problem. I didn't realize I needed the [UnitOfWork] attribute in the Controller (I had it disabled on the API) Also, I was not calling the API Asynchronously.

Thanks but I tried that if I start a new unit of work it causes the line

CheckErrors(await _roleManager.CreateStaticRoles(tenant.Id));

to give me the following error:

System.ObjectDisposedException: Cannot access a disposed object. Object name: 'RoleManagerProxy'.

Why does the CreateAsync(tenant) end the UnitOfWork

using (var uow = _unitOfWorkManager.Begin(TransactionScopeOption.RequiresNew))
            {
                //Create tenant
                var tenant = new Tenant(tenancyName, name)
                {
                    IsActive = isActive,
                    EditionId = editionId,
                    SubscriptionEndDateUtc = subscriptionEndDate?.ToUniversalTime(),
                    IsInTrialPeriod = isInTrialPeriod,
                    ConnectionString = connectionString.IsNullOrWhiteSpace() ? null : SimpleStringCipher.Instance.Encrypt(connectionString),
                    Address = address,
                    City = city,
                    Region = region,
                    PostalCode = postalCode,
                    Phone = phone,
                    EmailAddress = emailAddress
                };

                await CreateAsync(tenant);
                await _unitOfWorkManager.Current.SaveChangesAsync(); //To get new tenant's id.

                  //We are working entities of new tenant, so changing tenant filter
                using (_unitOfWorkManager.Current.SetTenantId(tenant.Id))
                {
                    //Create static roles for new tenant
                    CheckErrors(await _roleManager.CreateStaticRoles(tenant.Id));
                    await _unitOfWorkManager.Current.SaveChangesAsync(); //To get static role ids
Showing 1 to 10 of 25 entries