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

Activities of "ajayak"

How can I add TraceId in the swagger wrapper response?

{ "traceId": "My trace Id here", "result": null, "targetUrl": null, "success": false, "error": { "code": 0, "message": "An internal error occurred during your request!", "details": null, "validationErrors": null }, "unAuthorizedRequest": false, "__abp": true }

Hello,

I'm trying to update my project to AspNetZero V12.0.0-rc.1. When running the Angular project, I get a blank page the following error in browser console:

No error in command prompt

I'm sure it is an error in merging the framework update branch, but I cannot find the cause of this issue. Any idea on where to look?

The following files are correctly updated:

  1. angular.json
  2. root.module.ts
  3. root.component.ts
  4. AppPreBootstrap.ts
  5. app.component.ts
  6. app.component.html
  7. app.module.ts
Question
  • What is your product version? 11.3.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

Which is the best logging framework that works well with AspNetZero? We would like to have a dashboard for logging for quick and easy search, group events etc. that scales well with growing application needs :)

Updated the config as below:

https://app.primepenguin.com,https://app-eu.primepenguin.com,https://app-fr.primepenguin.com,http://app.primepenguin.com,http://app-eu.primepenguin.com,http://app-fr.primepenguin.com,https://*.primepenguin.com,http://primepenguinapp.trafficmanager.net,http://primepenguinservice.trafficmanager.net

And our app finally works correct now.

Error:

`app.primepenguin.com/:1 Access to XMLHttpRequest at 'https://service.primepenguin.com/AbpUserConfiguration/GetAll?d=1633500363976' from origin 'http://app.primepenguin.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
polyfills-es2015.f6c3bd581483604c3304.js:1 GET https://service.primepenguin.com/AbpUserConfiguration/GetAll?d=1633500363976 net::ERR_FAILED 503

@ismcagdas, I have reverted the changes that were made to cors. Can you help me in fixing my CORS origin? Our frontend app is not able to access backend. Current config:

"CorsOrigins": "https://primepenguin.com,https://*.primepenguin.com,http://primepenguinapp.trafficmanager.net,http://primepenguinservice.trafficmanager.net,https://app-eu.primepenguin.com,https://app-fr.primepenguin.com,https://localhost:4200",

@ismcagdas, I cannot find anything useful in logs. It is only related to CORS.

Prerequisites

  • What is your product version? 10.5
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .NET Core

After updating to v10.5, we are getting a lot of CORS issues. For now, we have updated our cors code as follows:

services.AddCors(options =>
{
    options.AddPolicy(DefaultCorsPolicyName, builder =>
    {
        builder
            .SetIsOriginAllowedToAllowWildcardSubdomains()
            .AllowAnyOrigin()
            .AllowAnyHeader()
            .AllowAnyMethod();
    });
});

But now, we get error in SignalR requests. Can someone please help?

Our original CORS config in appsettings:

    "CorsOrigins": "https://*.primepenguin.com,http://primepenguinapp.trafficmanager.net,http://localhost:4200,http://localhost:9876"

@musa.demir can you also check the first query?

(@UpperBound uniqueidentifier)SELECT   [Id],
         [CreationTime],
         [CreatorUserId],
         DATALENGTH([Data]),
         [Data],
         [DataTypeName],
         [EntityId],
         [EntityTypeAssemblyQualifiedName],
         [EntityTypeName],
         [NotificationName],
         [Severity],
         [TenantId]
FROM     [dbo].[AbpTenantNotifications]
WHERE    [Id] < @UpperBound
ORDER BY [Id] ASC

2 executions of this query took almost 13 minutes as shown by Azure graph. May be this query is fetching a huge chunk of data. We have 31384 records in AbpTenantNotifications table.

Query 1:

(@UpperBound uniqueidentifier)SELECT   [Id],
         [CreationTime],
         [CreatorUserId],
         DATALENGTH([Data]),
         [Data],
         [DataTypeName],
         [EntityId],
         [EntityTypeAssemblyQualifiedName],
         [EntityTypeName],
         [NotificationName],
         [Severity],
         [TenantId]
FROM     [dbo].[AbpTenantNotifications]
WHERE    [Id] < @UpperBound
ORDER BY [Id] ASC

Query 2:

(@p0 uniqueidentifier)DELETE FROM [AbpNotifications]
WHERE [Id] = @p0

Query 3:

(@__ef_filter__p_0 bit,@__ef_filter__CurrentTenantId_1 int,@__utcNow_0 datetime2(7))SELECT [a].[Id], [a].[ExpireDate], [a].[LoginProvider], [a].[Name], [a].[TenantId], [a].[UserId], [a].[Value]
FROM [AbpUserTokens] AS [a]
WHERE ((@__ef_filter__p_0 = CAST(1 AS bit)) OR ([a].[TenantId] = @__ef_filter__CurrentTenantId_1)) AND ([a].[ExpireDate] <= @__utcNow_0)
Showing 1 to 10 of 202 entries