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

Activities of "tbentley"

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

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

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

I am running the ASP.NET Core & Angular version v9.0.1

I am able to add a tenant using the Swagger call and also from the angular client. However, when I call the same API using the Public website I get an error. I tracked it down to the TenantManager

await CreateAsync(tenant);
await _unitOfWorkManager.Current.SaveChangesAsync();

The CreateAsync(tenant) creates the tenant record but it sets _unitOfWorkManager.Current to null.

Does anyone know why this is happening and how to correct it?

Thanks... Terry

I'm using version Abp.AspNetCore v5.10.1 using angular I haave been using this application for a while and have recently added some Stripe APIs and have suddenly run into an error when I try to log into swagger and select the "Swagger UI" button I get the error Failed to load API definition Errors Fetch error undefined /swagger/v1/swagger.json

in the log.txt file is the following error. I am not sure what is causing it or how to get rid of it.

INFO 2020-11-15 17:18:33,784 [7 ] NetCore.StaticFiles.StaticFileMiddleware - Sending file. Request path: '/favicon-32x32.png'. Physical path: 'N/A' INFO 2020-11-15 17:18:33,785 [7 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 6.4973ms 200 image/png ERROR 2020-11-15 17:18:34,222 [4 ] nostics.DeveloperExceptionPageMiddleware - An unhandled exception has occurred while executing the request. System.InvalidOperationException: Can't use schemaId "$Customer" for type "$Stripe.Customer". The same schemaId is already used for type "$UnuHub.Orders.Customer" at Swashbuckle.AspNetCore.SwaggerGen.SchemaRepository.ReserveIdFor(Type type, String schemaId) at Swashbuckle.AspNetCore.SwaggerGen.SchemaRepository.GetOrAdd(Type type, String schemaId, Func1 factoryMethod) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateReferencedSchema(DataContract dataContract, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateSchemaForType(Type type, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GeneratePropertySchema(DataProperty serializerMember, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateObjectSchema(DataContract dataContract, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateInlineSchema(DataContract dataContract, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.<>c__DisplayClass7_0.<GenerateReferencedSchema>b__0() at Swashbuckle.AspNetCore.SwaggerGen.SchemaRepository.GetOrAdd(Type type, String schemaId, Func1 factoryMethod)

Any help is much appreciated. Thanks... Terry

I'm using the latest version of AspNetZero (v9.1.0) .NetCore with angular. I am trying to export my grid using the ExportToFile used in the auditLog as a example

The Excel Spreadsheet is getting generated correctly except all my decimal values (Dollar amounts) are flagged with a warning as "The number in this cell is formatted as text or preceded by an apostrophe"

This is how it defauls so I then tried using a variety of methods to format the currency For example.

                ICellStyle currencyFmt = sheet.Workbook.CreateCellStyle();
                 currencyFmt.DataFormat = (short)7; //"($#,##0.00);($#,##0.00)"


                sheet.SetDefaultColumnStyle(5, currencyFmt);

How do I have amount get output as numbers into Excel so I can do computation on them

I know if I multiply the values by a cell containing a 1 that the numbers convert to a number but that is a cumbersome hack.

Thanks.... Terry

I am running AspNetZero v9.0.1 on .Net core and Angular

I log in as the host and I have been able to add a Webhook subscription and can retrieve it using Swagger https://localhost:44301/api/services/app/WebhookSubscription/GetSubscription?subscriptionId=359EA8AC-8B77-4997-8F89-xxxxxxxxxxxx { "result": { "tenantId": 5, "webhookUri": "https://webhook.site/761e8496-2e28-4e1d-844a-xxxxxxxxxxxx", "secret": "27f232be-3ee4-4791-b91d-xxxxxxxxxxxx", "isActive": true, "webhooks": [ "App.NewDeliveryOrder" ], "headers": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "id": "359ea8ac-8b77-4997-8f89-xxxxxxxxxxxx" }, "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true }

But when I call https://localhost:44301/api/services/app/WebhookSubscription/GetAllSubscriptions The response is: { "result": { "items": [] }, "targetUrl": null, "success": true, "error": null, "unAuthorizedRequest": false, "__abp": true }

I get no subscriptions. I should at least get the one above. There are no errors in the AuditLog.

Any ideas? Thanks... Terry

I am running Angular, with .Net Core on version 9.0.1 of AspNetZero

I have read the Webhook documentation for AspNetZero and the AspBoilerplate but I cannot see how to initiate the webhook event. I have also read the http://volosoft.com/Blog/ASP.NET-CORE-3.1-Webhook-Implementation-Using-Pub-Sub where I also see what the standard WebhookPayload.cs that I need to build (I think)

I have a CreateOrder Api that when called (and successful), I want to initiate a webhook NewDelivery event to be initiated which is subscribe to by selected Delivery/Courier companies.

I have followed the instructions for creating the WebHook Publisher and the Subscription for the NewDeliveryOrderWebhook but what is the process to call the webhook from the API (or associated Manager).

Any help would really be appreciated.

Thanks... Terry

.

Showing 1 to 9 of 9 entries