Base solution for your next web application

Activities of "tom.ohle"

For our account [email protected], we are unable to download Metronic 6.x. We get an error "Not found". If we go directly to github.com/orgs/aspnetzero

We only see the "Documents" repository.

Can you help?

On the server side, I would like to send emails to users based on their CultureInfo setting stored.

I cannot use CultureInfo.CurrentCulture because I don't want the CultureInfo information for the current logged in user. I want it for another user.

It appears that if a user chooses a language that is different from default the entry will display in the AbpSettings table. However, what would be the best way programmatically to retrieve this data in the Asp.Net Core project?

Hi experts, We have tight security on our servers and we recently migrated from hosting our Asp.Net Zero application in Wndows to Linux. After doing so, we found that calls to the SendEmailAsync in the Abp MailKitEmailSender class would just hang and never complete. After doing some extensive network sniffing, we found that the following call was being made out to the internet and was blocked because of our security: ocsp.digicert.com/MFEwTzBNMEswSTAJBgUrDgMCGgUABBQQX6Z6gAidtSefNc6DC0OInqPHDQQUD4BhHIIxYdUvKOeNRji0LOHG2eICEAkNK6BEikcNL2V2lRiqNKM= Port: 72.21.91.29

Once we opened we opened this port up the SendEmailAsync method worked with no issue. However, our network team will not open this port up for us on our servers until we can explain the purpose of this call. I'm not sure why MailKit would check/download a certificate since we are not using SSL for our emails and have the Use SSL checkbox unchecked.

Would you be able to help?

Hello, we accidentally created the new WIP_Write_Off project when we really meant to just download a specific version (v6.9.1) for an existing project Stantec.WIP_Write_Off. Is there anyway you can help us delete that WIP_Write_Off project, but still keep the existing Stantec.WIP_Write_Off project?

UPDATE It looks like our project count is still accurate which is what I was mainly concerned about. Therefore, no action needed on your part - I'm OK if this project is not deleted.

Per the documentation (https://github.com/abpframework/abp/blob/master/docs/en/Background-Jobs.md#configuration) I should be able to change the default timeout by overriding the ConfigureServices method but the AbpBackgroundJobsModule cannot be resolved.

Is there another way to go about this? Can the timeout be changed for individual background jobs?

The documentation also references the Volo.Abp.BackgroundJobs nuget package but none of the projects within the ASP.NET Zero generated project reference the nuget package.

The notification is called like this in tenant-settings.component.ts.

this.notify.info(this.l('SavedSuccessfully'));

And this is what it looks like in the browser (Google Chrome, Version 74.0.3729.108 (Official Build) (64-bit)).

I used the RAD tools to generate an entity, then migrated over 3 million records into the generated table. Now the app hangs attempting to retrieve a 10 record page of results. I added a logger to the DBContext and found that it is waiting for a long running query.

SELECT [e].*
FROM [MyEntityTable] AS [e]
LEFT JOIN (
    SELECT [e0].*
    FROM [MyOtherEntityTable] AS [e0]
    WHERE ([e0].[IsDeleted] = 0) OR ([e0].[IsDeleted] <> 'True')
) AS [t] ON [e].[DocumentId] = [t].[Id]
WHERE ([e].[IsDeleted] = 0) OR ([e].[IsDeleted] <> 'True')

The raw SQL query looks weird since I am only going after a page of data (ie. not the entire table). Other captured queries are including pagination in the query, like this one for AbpUserAccounts which includes ORDER BY and OFFSET clauses.

SELECT [e].[UserId] AS [Id], [e].[TenantId], CASE
    WHEN [t].[Id] IS NULL
    THEN N'.' ELSE [t].[TenancyName]
END AS [TenancyName], [e].[UserName], [e].[LastLoginTime]
FROM [AbpUserAccounts] AS [e]
LEFT JOIN (
    SELECT [e0].*
    FROM [AbpTenants] AS [e0]
    WHERE ([e0].[IsDeleted] = 0) OR ([e0].[IsDeleted] <> @__ef_filter__IsSoftDeleteFilterEnabled_1)
) AS [t] ON [e].[TenantId] = [t].[Id]
WHERE (([e].[IsDeleted] = 0) OR ([e].[IsDeleted] <> @__ef_filter__IsSoftDeleteFilterEnabled_0)) AND ((((([e].[TenantId] <> @__currentUserIdentifier_TenantId_0) OR [e].[TenantId] IS NULL) OR ([e].[UserId] <> @__currentUserIdentifier_UserId_1)) AND [e].[UserLinkId] IS NOT NULL) AND [e].[UserLinkId] IS NULL)
ORDER BY [e].[UserName]
OFFSET @__p_3 ROWS FETCH NEXT @__p_4 ROWS ONLY

I noticed these warnings which could be the culprit.

Microsoft.EntityFrameworkCore.Query:Warning: The LINQ expression 'orderby __ObjectMapper_0.Map([e]).Status desc' could not be translated and will be evaluated locally.
Microsoft.EntityFrameworkCore.Query:Warning: The LINQ expression 'Skip(__p_1)' could not be translated and will be evaluated locally.
Microsoft.EntityFrameworkCore.Query:Warning: The LINQ expression 'Take(__p_2)' could not be translated and will be evaluated locally.

It looks like the query is running without pagination against the database, and then applied once the data is loaded into application memory. This agrees with my observation of the app's memory usage while waiting for this query to return.

I found this generated code for my entity which I believe should take care of pagination, but instead seems to generate the warnings above.

var myEntities = await query
  .OrderBy(input.Sorting ?? "myEntity.id asc")
  .PageBy(input)
  .ToListAsync();

Any idea why these LINQ expressions could not be translated?

Starting with a new 5.6.1 project (ASP.NET Core/Angular6), I enabled and configured OpenID Connect with Azure AD, spun up the app locally (visual studio 2017 debugger for back end; npm start for front end), and successfully authenticated by clicking the OpenID Connect icon on the login page.

Then I built the docker images and ran them, but now when I click the OpenID Connect icon I get this error.

System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

Any idea why this error is only occurring when using Docker?

Here is the full stack trace.

System.InvalidOperationException: IDX20803: Unable to obtain configuration from: '[PII is hidden by default. Set the 'ShowPII' flag in IdentityModelEventSource.cs to true to reveal it.]'. ---> System.IO.IOException: IDX20804: Unable to retrieve document from: '[PII is hidden by default. Set the 'ShowPII' flag in IdentityModelEventSource.cs to true to reveal it.]'. ---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
   at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Security.SslState.ThrowIfExceptional()
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
   at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__47_1(IAsyncResult iar)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel)
   --- End of inner exception stack trace ---
   at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel)
   at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel)
   at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)
   --- End of inner exception stack trace ---
   at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)
   at Abp.AspNetZeroCore.Web.Authentication.External.OpenIdConnect.OpenIdConnectAuthProviderApi.ValidateToken(String token, String issuer, IConfigurationManager`1 configurationManager, CancellationToken ct)
   at Abp.AspNetZeroCore.Web.Authentication.External.OpenIdConnect.OpenIdConnectAuthProviderApi.GetUserInfo(String token)
   at Stantec.DocView.Web.Controllers.TokenAuthController.GetExternalUserInfo(ExternalAuthenticateModel model)
   at Stantec.DocView.Web.Controllers.TokenAuthController.ExternalAuthenticate(ExternalAuthenticateModel model)
   at lambda_method(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()

This seems to be the same issue: <a class="postlink" href="https://github.com/dotnet/corefx/issues/30313">https://github.com/dotnet/corefx/issues/30313</a>

I'm using the AspNetZeroAngular2 v5.6.1 solution template and generated entities using the RAD tool. I get the following error when attempting to build the solution after successfully adding the entities. What is the fix for this?

Severity Code Description Project File Line Suppression State Error CS7036 There is no argument given that corresponds to the required formal parameter 'cacheManager' of 'EpPlusExcelExporterBase.EpPlusExcelExporterBase(ICacheManager)'

I had some general questions about the integration with Metronic and Asp.Net Zero. We are using the Angular/.Net Core ASP.Net Zero starter template

  1. Is there a way to tell by looking at the Angular source code what version of Metronic we are on? I guessed v5.1 because that was the accompanying metronic zip download on the Asp.Net Zero size, but I was wondering if there was another way?

  2. Are there instructions on how we could upgrade the v5.1 Metronic code to v5.3 within the Asp.Net Zero framework? Or how to do Metronic upgrades in general?

Showing 11 to 20 of 23 entries