I mean,
I have lots of Unix/Linux server and i want to send telemetry data like hostname, memory to my backend (aspnetzero) system via curl command. And i want to schedule this command with crontab.
At backend system i want to create a Bearer token not expired or expire in 1 or 2 years. And i want to use this bearer token in curl command. I dont want to write username or password at crontab command or script.
Muhittin
Hi,
I go the following error when i click "Export to Excel".
selectedColumns was null
AspNetZero Core, MVC 14.0.0
I created entity via RAD Tools and only 1 property names "Name".
Hi,
I want to write an application that collects data from external clients. That is, it collects data externally using curl, without using a username and password, only using tokens. How can I do this?
Like Jira. In jira we create a token with not expired. And clients connect to Jira with this token. I want to user similar senario on asp net zero app.
Muhittin
I solved the problem. Its about source data column size. It is not releated to row count.
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
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.
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.HttpConnectionWaiter
1.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.