Base solution for your next web application

Activities of "muhittincelik"

Answer

I solved the problem. Its about source data column size. It is not releated to row count.

Question

Hi,

I got 3376 record from a query and i want to insert this result to my application;

I am using 13.1.1

Code is;

var ajaxResponse = JsonConvert.DeserializeObject<UCMDBCis>(content);
int i = 0;
foreach (UCMDBContent data in ajaxResponse.Cis)
{
    var filteredHostname = _stageHostRepository.GetAll()
                            .WhereIf(!string.IsNullOrWhiteSpace(data.Properties.Name), e => false || e.Hostname.Contains(data.Properties.Name))
                            .ToList();

    if (filteredHostname.GetEnumerator().MoveNext() == false)
    {
       CreateOrEditStageHostDto stageHost = new CreateOrEditStageHostDto();

        stageHost.FeedSourceId = filteredFeedSource.FirstOrDefault().Id;
        stageHost.Hostname = data.Properties.Name;

        Create(stageHost);
    }

    i++;

    if (i == 500) { break; }
}

This code is running successfully. But where i remove 500 record count segment i got the following error;

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated. at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

How can i insert thousands of records ?

Sorry state is refreshing, page not refreshing. There is no problem.

Whıt healtchecks not refreshing every 10 second.

At healthchecks-ui page, i saw "Polling interval: secs" How many seconds ? It is empty

My config is;

}, "HealthChecks": { "HealthChecksEnabled": true, "HealthChecksUI": { "HealthChecksUIEnabled": true, "HealthChecks": [ { "Name": "Smart.Web.Host", "Uri": "http://localhost:9901/health" } ], "EvaluationTimeOnSeconds": 10, "MinimumSecondsBetweenFailureNotifications": 60 } } }

How can i refresh every x second ? Is there any other parameter ?

Muhittin

Answer

I found the problem.

I add the following line to app.settings.production file

"HomePageUrl": "",

HomeController.cs is checking environment is dev or prod. Local pc is dev so core app is running. But on server dont redirect to /Ui/login page.

Question

I am developing on 12.0.1 Angular & Core

I can run application and angular site on my local PC.

I published to IIS Server and i got the following errors.

I am using 9901 port for core application and 4200 for angular application.

I got Error 404 when go to localhost:9901. Bun i can go localhost:9901/swagger.

stdout log is;

WARN 2023-11-27 11:17:35,035 [1 ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'AnnualPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. WARN 2023-11-27 11:17:35,044 [1 ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'DailyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. WARN 2023-11-27 11:17:35,045 [1 ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'MonthlyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. WARN 2023-11-27 11:17:35,045 [1 ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'WeeklyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. WARN 2023-11-27 11:17:35,045 [1 ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'Amount' on entity type 'SubscriptionPayment'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'. WARN 2023-11-27 11:17:36,965 [1 ] tion.Repositories.EphemeralXmlRepository - Using an in-memory repository. Keys will not be persisted to storage. WARN 2023-11-27 11:17:36,965 [1 ] taProtection.KeyManagement.XmlKeyManager - Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits. WARN 2023-11-27 11:17:37,383 [1 ] taProtection.KeyManagement.XmlKeyManager - No XML encryptor configured. Key {36746b23-1004-4ed3-870a-554d23941ef1} may be persisted to storage in unencrypted form. Hosting environment: Production Content root path: D:\WebSites\SmartInventory_12.0.0\CoreWebSite Now listening on: http://*:9901/ Application started. Press Ctrl+C to shut down. ERROR 2023-11-27 11:17:41,789 [10 ] HostedService.HealthCheckReportCollector - GetHealthReport threw an exception when trying to get report from https://localhost:44301/health configured with name Smart.Web.Host. System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:44301) ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it. at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 122

**Hi,

I have a fresh copy of 12.2.0

I ran web.host project. And ran refresh.bat under nswag folder to refresh services. Whe i start angular application i got the following error.**

× Failed to compile. √ Browser application bundle generation complete.

Initial Chunk Files | Names | Raw Size runtime.js | runtime | 12.64 kB |

1257 unchanged chunks

Build at: 2023-06-03T22:35:20.555Z - Hash: 3feeafa21a119a8a - Time: 1680ms

Error: src/app/shared/layout/chat/chat-bar.component.ts:336:14 - error TS2554: Expected 4 arguments, but got 3.

336 .getUserChatMessages(user.friendTenantId ? user.friendTenantId : undefined, user.friendUserId, minMessageId) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/shared/service-proxies/service-proxies.ts:1574:117 1574 getUserChatMessages(tenantId: number | undefined, userId: number | undefined, minMessageId: number | undefined, maxResultCount: number | undefined): Observable<ListResultDtoOfChatMessageDto> {

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An argument for 'maxResultCount' was not provided.

× Failed to compile.

I solved the problem. I deinstall/install node.js and install yarn again, solved the problem.

Muhittin

Hi,

I got the following error. How can i resolve this error.

[email protected] start ng serve --host 0.0.0.0 --port 4200

Warning: This is a simple server for use in testing or debugging Angular applications locally. It hasn't been reviewed for security issues.

Binding this server to an open connection can result in compromising your application or computer. Using a different host than the one passed to the "--host" flag might result in websocket connection issues. You might need to use "--disable-host-check" if that's the case. One or more browsers which are configured in the project's Browserslist configuration will be ignored as ES5 output is not supported by the Angular CLI. Ignored browsers: kaios 2.5, op_mini all

  • Generating browser application bundles (phase: setup)... TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and "false" respectively by the Angular CLI. To control ECMA version and features use the Browerslist configuration. For more information, see https://angular.io/guide/build#configuring-browser-compatibility \ Generating browser application bundles (phase: sealing)... <--- Last few GCs --->

[32612:0922B480] 18951 ms: Mark-sweep 965.1 (1043.3) -> 950.3 (1037.5) MB, 261.4 / 0.0 ms (average mu = 0.175, current mu = 0.105) allocation failure; scavenge might not succeed [32612:0922B480] 19236 ms: Mark-sweep 960.2 (1045.9) -> 952.2 (1032.1) MB, 278.9 / 0.0 ms (average mu = 0.102, current mu = 0.021) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 017C80BB v8::internal::Heap::PageFlagsAreConsistent+3323 2: 017BBD97 v8::internal::Heap::CollectGarbage+1767 3: 017D00B7 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath+2439

Hi

What about power tools. Is it released ?

Muhittin

Showing 1 to 10 of 95 entries