Activities of "jlavallet"

  • ABP Framework version: v4.4.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:

2021-11-03 21:21:43.774 -05:00 [ERR] An exception occurred while iterating over the results of a query for context type 'Volo.Saas.EntityFrameworkCore.SaasDbContext'. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.BufferedDataRecord.InitializeAsync(DbDataReader reader, IReadOnlyList1 columns, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.InitializeAsync(IReadOnlyList1 columns, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.InitializeAsync(IReadOnlyList1 columns, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.BufferedDataRecord.InitializeAsync(DbDataReader reader, IReadOnlyList1 columns, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.InitializeAsync(IReadOnlyList1 columns, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.InitializeAsync(IReadOnlyList1 columns, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() 2021-11-03 21:21:43.838 -05:00 [ERR] A task was canceled. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.BufferedDataRecord.InitializeAsync(DbDataReader reader, IReadOnlyList1 columns, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.InitializeAsync(IReadOnlyList1 columns, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.BufferedDataReader.InitializeAsync(IReadOnlyList1 columns, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable1 asyncEnumerable, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable1 asyncEnumerable, CancellationToken cancellationToken) at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository3.FindAsync(TKey id, Boolean includeDetails, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Saas.Tenants.TenantStore.GetCacheItemAsync(Nullable1 id, String name) at Volo.Saas.Tenants.TenantStore.FindAsync(Guid id) at ClientsLink.Data.ClientsLinkTenantDatabaseMigrationHandler.MigrateAndSeedForTenantAsync(Guid tenantId, String adminEmail, String adminPassword) in D:\Century\Internal\Clients.Link\Clients.Link\src\ClientsLink.Domain\Data\ClientsLinkTenantDatabaseMigrationHandler.cs:line 98

This is occurring on the highlighted line of code below:

private async Task MigrateAndSeedForTenantAsync(
    Guid tenantId,
    string adminEmail,
    string adminPassword)
{
  try
  {
    using (_currentTenant.Change(tenantId))
    {
      // Create database tables if needed
      using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: false))
      {
        var tenantConfiguration = await _tenantStore.FindAsync(tenantId); // EXCEPTION THROWN HERE
        if (tenantConfiguration?.ConnectionStrings != null &&
            !tenantConfiguration.ConnectionStrings.Default.IsNullOrWhiteSpace())
        {
          foreach (var migrator in _dbSchemaMigrators)
          {
            _logger.LogDebug($"Running migration {migrator.ToString()}");
            await migrator.MigrateAsync();
          }
        }

        await uow.CompleteAsync();
      }
  • Steps to reproduce the issue:
  1. Use ABP Commercial Suite v 4.4.3 to generate a Sample Tiered MVC application
  2. Add a couple of entities - one global and one multitenant with a navigation property to the global one
  3. Create a Sample database
  4. Run the DbMigrator - host database will be migrated successfully
  5. Run the web application, login as admin, create a new Test tenant - after about a minute, the UI reports an Internal Error and the exception above is logged

It seems fairly obvious after working this for two weeks, there is something preventing the execution of the _tenantStore.FindAsync(tenantId) call.

What possible things could cause that call to timeout or be canceled?

Please think about your response and be as verbose as possible.

I have swapped out every component. I have built and rebuilt on two separate machines. I have rewritten my data seed contributors. I have swapped out System.Data.SqlClient for Microsoft.Data.SqlClient and set the Command Timeout connection string argument two 3600. Nothing I have tried in two weeks is resolving this issue.

Making tthe changes at tthe end of that post did the trick. If the generated code has these settings set to true by default, how is it that many many others are not encountering the same problem? I don't believe my environment was unique by any stretch of the imagination. Why isn't this in the documentation?!

  • ABP Framework version: v4.4.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

Exception message and stack trace:

Tenant not found! There is no tenant with the tenant id or name: 7572dd13-542f-e30e-89aa-3a000

Steps to reproduce the issue:"

  1. Delete the database
  2. Create the database
  3. Run the DbMigrator without incident
  4. Run the Host, Identity Server, and Web projects

At this point all three tabs show the error message above. I have searched my code for fragments of the error message without finding anything. I have flushed my Redis cache.

Any ideas?

Simple question - how do I search the support forum for a phrase?

When I enter search terms in the search field, it returns posts that match any one of my a search terms without ranking posts higher that contain the entire phrase or part of the phrase.

What am I missing?

For example, I wanted to search for the phrase "filter by role" with which I had hoped to find some best practices or examples of using the logged in user's role or ID to return data scoped for that user.

So if you could piate it answer both of my questions I would appreciate it.

Okay great. When can I expect that functionality to be released?

In the meantime, could you address the need I expressed?

I had hoped to find some best practices or examples of using the logged in user's role or ID to return data scoped for that user.

Here is a link to a Stack Overflow post I made that goes into more detail: https://stackoverflow.com/questions/70297404/filtering-queries-by-by-user-and-role-scoping-data

Please scroll to the bottom for updates!
  • ABP Framework version: v5.1.3

  • UI type: MVC

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): yes

  • Exception message and stack trace: Line 29 (see attached image): 'LoginModel' does not contain a constructor that takes 3 arguments. Line 35, 47, 48, 60, and 61: Cannot resolve the symbol 'LoginInput'.

  • Others appear to be the result of subclassing the wrong base class.

  • Steps to reproduce the issue: I have been trying to override the login page to implement the ideas expressed in these posts:

    https://community.abp.io/posts/hide-the-tenant-switch-of-the-login-page-4foaup7p https://community.abp.io/articles/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd

I have been especially trying to follow the second article since it is coming from ABP. Because I am using the commercial product, it looks like I don't have access Volo.Abp. Account.Web or it is not available because that namespace has been replaced. I feel like I am probably missing a reference. Please advise.

UPDATE 2022/02/14

I was able to get my code to compile my borrowing the CustomLoginModel class from the abp-samples/SignInWithoutSpecifyingTenant project. This project is based on version 4.3.2, however, and as I noticed later, it does not have a separate IdentityServer project for authentication.

When I noticed the Identity Server difference, it dawned on me that I was probably overriding the wrong Login page!

Because we are using a multitier separated tenant model with a separate Identity Server site for authentication, overriding the Login.cshtml file in the BlueSpot.Web project has no effect. Now I’m trying to figure out now how to override the Login page of the BlueSpot.IdentityServer project instead.

Please advise!

Here is my latest code:

From the BlueSpot.Web.BlueSpotWebModule:

public override void ConfigureServices(ServiceConfigurationContext context)
{
  var hostingEnvironment = context.Services.GetHostingEnvironment();
  var configuration = context.Services.GetConfiguration();
 
  ConfigureBundles();
  ConfigurePages(configuration);
  ConfigureCache(configuration);
  ConfigureDataProtection(context, configuration, hostingEnvironment);
  ConfigureUrls(configuration);
  ConfigureAuthentication(context, configuration);
  ConfigureImpersonation(context, configuration);
  ConfigureAutoMapper();
  ConfigureVirtualFileSystem(hostingEnvironment);
  ConfigureNavigationServices(configuration);
  ConfigureSwaggerServices(context.Services);
  ConfigureMultiTenancy();
  ConfigureBackgroundJobs();
  ConfigureTenantResolver(context);
}
 
private static void ConfigureTenantResolver(ServiceConfigurationContext context)
{
  context.Services.Configure<AbpTenantResolveOptions>(options =>
  {
    options.TenantResolvers.Clear();
    options.TenantResolvers.Add(new CurrentUserTenantResolveContributor());
  });
}

And from my BlueSpot.Web.Pages.Account.CustomLoginModel.cs file:

using System.Threading.Tasks;
using IdentityServer4.Services;
using IdentityServer4.Stores;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Owl.reCAPTCHA;
using Volo.Abp.Account.ExternalProviders;
using Volo.Abp.Account.Public.Web;
using Volo.Abp.Account.Security.Recaptcha;
using Volo.Abp.Account.Web.Pages.Account;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Security.Claims;
using Volo.Saas.Tenants;
using IdentityUser = Volo.Abp.Identity.IdentityUser;
 
namespace BlueSpot.Web.Pages.Account;
 
[ExposeServices(typeof(IdentityServerSupportedLoginModel))]
public class CustomLoginModel : IdentityServerSupportedLoginModel
{
  private readonly ITenantRepository _tenantRepository;
 
  public CustomLoginModel(
    IAuthenticationSchemeProvider schemeProvider,
    IOptions<AbpAccountOptions> accountOptions,
    IAccountExternalProviderAppService accountExternalProvider,
    IIdentityServerInteractionService interaction,
    IClientStore clientStore,
    IEventService identityServerEvents,
    ICurrentPrincipalAccessor currentPrincipalAccessor,
    IAbpRecaptchaValidatorFactory recaptchaValidatorFactory,
    IOptions<IdentityOptions> identityOptions,
    IOptionsSnapshot<reCAPTCHAOptions> reCaptchaOptions,
    ITenantRepository tenantRepository)
    : base(schemeProvider, accountOptions, accountExternalProvider, interaction, clientStore, identityServerEvents,
      currentPrincipalAccessor, recaptchaValidatorFactory, identityOptions, reCaptchaOptions)
  {
    _tenantRepository = tenantRepository;
  }
 
  public override async Task<IActionResult> OnPostAsync(string action)
  {
    var user = await FindUserAsync(LoginInput.UserNameOrEmailAddress);
    using (CurrentTenant.Change(user?.TenantId))
    {
      return await base.OnPostAsync(action);
    }
  }
 
  public override async Task<IActionResult> OnGetExternalLoginCallbackAsync(string returnUrl = "",
    string returnUrlHash = "", string remoteError = null)
  {
    var user = await FindUserAsync(LoginInput.UserNameOrEmailAddress);
    using (CurrentTenant.Change(user?.TenantId))
    {
      return await base.OnGetExternalLoginCallbackAsync(returnUrl, returnUrlHash, remoteError);
    }
  }
 
  protected virtual async Task<IdentityUser> FindUserAsync(string uniqueUserNameOrEmailAddress)
  {
    IdentityUser user = null;
    using (CurrentTenant.Change(null))
    {
      user = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress) ??
             await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress);
 
      if (user != null)
      {
        return user;
      }
    }
 
    foreach (var tenant in await _tenantRepository.GetListAsync())
    {
      using (CurrentTenant.Change(tenant.Id))
      {
        user = await UserManager.FindByNameAsync(LoginInput.UserNameOrEmailAddress) ??
               await UserManager.FindByEmailAsync(LoginInput.UserNameOrEmailAddress);
 
        if (user != null)
        {
          return user;
        }
      }
    }
 
    return null;
  }
}

Note that I had to modify the constructor to support the IdentityServerSupportedLoginModel base class constructor.

And here is my Login.cshtml file:

@page
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.Account.Localization
@using Volo.Abp.Account.Settings
@using Volo.Abp.Settings
@model BlueSpot.Web.Pages.Account.CustomLoginModel
@inject IHtmlLocalizer<AccountResource> L
@inject Volo.Abp.Settings.ISettingProvider SettingProvider
<div class="card mt-3 shadow-sm rounded">
    <div class="card-body p-5">
        <h4>@L["Login"]</h4>
        @if (await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled))
        {
            <strong>
                @L["AreYouANewUser"]
                <a href="@Url.Page("./Register", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})" class="text-decoration-none">@L["Register"]</a>
            </strong>
        }
        @if (Model.EnableLocalLogin)
        {
            <form method="post" class="mt-4">
                <div class="mb-3">
                    <label asp-for="LoginInput.UserNameOrEmailAddress" class="form-label"></label>
                    <input asp-for="LoginInput.UserNameOrEmailAddress" class="form-control"/>
                    <span asp-validation-for="LoginInput.UserNameOrEmailAddress" class="text-danger"></span>
                </div>
                <div class="mb-3">
                    <label asp-for="LoginInput.Password" class="form-label"></label>
                    <input asp-for="LoginInput.Password" class="form-control"/>
                    <span asp-validation-for="LoginInput.Password" class="text-danger"></span>
                </div>
                <abp-row>
                    <abp-column>
                        <abp-input asp-for="LoginInput.RememberMe" class="mb-4"/>
                    </abp-column>
                    <abp-column class="text-end">
                        <a href="@Url.Page("./ForgotPassword", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})">@L["ForgotPassword"]</a>
                    </abp-column>
                </abp-row>
                <div class="d-grid gap-2">
                    <abp-button type="submit" button-type="Primary" name="Action" value="Login" class="btn-lg mt-3">@L["Login"]</abp-button>
                    @if (Model.ShowCancelButton)
                    {
                        <abp-button type="submit" button-type="Secondary" formnovalidate="formnovalidate" name="Action" value="Cancel" class="btn-lg mt-3">@L["Cancel"]</abp-button>
                    }
                </div>
            </form>
        }
 
        @if (Model.VisibleExternalProviders.Any())
        {
            <div class="mt-2">
                <h5>@L["OrLoginWith"]</h5>
                <form asp-page="./Login" asp-page-handler="ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" asp-route-returnUrlHash="@Model.ReturnUrlHash" method="post">
                    @foreach (var provider in Model.VisibleExternalProviders)
                    {
                        <button type="submit" class="btn btn-primary m-1" name="provider" value="@provider.AuthenticationScheme" title="@L["LogInUsingYourProviderAccount", provider.DisplayName]">@provider.DisplayName</button>
                    }
                </form>
            </div>
        }
 
        @if (!Model.EnableLocalLogin && !Model.VisibleExternalProviders.Any())
        {
            <div class="alert alert-warning">
                <strong>@L["InvalidLoginRequest"]</strong>
                @L["ThereAreNoLoginSchemesConfiguredForThisClient"]
            </div>
        }
 
    </div>
</div>
UPDATE 2022-02-15

This morning I checked to see if there was any response to this post. I am now going on four days without a response. If I am a paying customer, then why am I not getting a response?! I am on almost exactly the opposite side of the globe so each day I don't get a response means that I lose a full day waiting. I made the recommendation to go with ABP.IO Commercial and now I'm getting heat from my boss because the product is not being supported. Please advise!

Since last night, I was able to find the following post on your website: https://gist.github.com/ebicoglu/ce0f0425bab806d0ee1a87d0073af96b. Using that and the documentation here: https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface, I was able to make changes to my implementation, moving the Account folder to the Identity Server project and updating the code so that I am now able to replace the Login functionality. The Login page works as it should now!

However, as soon I try to log out, I now get the following error:

An unhandled exception occurred while processing the request.
ComponentNotRegisteredException: The requested service 'Volo.Abp.Account.Public.Web.Pages.Account.LogoutModel' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable<Parameter> parameters)

I believe this problem probably has something to do with clearing the TenantResolvers in the BlueSpotIdentityServerModule. I am doing so because I want to follow the original post and use the email address of the user to resolve the tenant instead of requiring the user to select the tenant or use a subdomain/A record to do so.

According to my theory, I set a breakpoint so I could look at the default set of resolvers:

I was hoping to see some kind of Logout resolver that I could add back in. Instead I see all the multitenant resolvers and I have no idea whether to add one of these back into the mix.

Another approach I tried was to create a CustomLogoutModel and Logout.cshtml file:

using Volo.Abp.Account.Public.Web.Pages.Account;

namespace BlueSpot.Pages.Account;

public class CustomLogoutModel : LogoutModel { }

@page "/Account/Logout"
@model BlueSpot.Pages.Account.CustomLogoutModel

But that did not seem to help. Again, please advise!

Li, I sent you an email regarding a time to do a remote session I am in the Central Standard Time zone (GMT -6). I can make myself available with a little bit of notice.

Let me get it back into a compiled state, and I will send it to you.

ABP Framework version: v5.2 UI type: Blazor DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): Microservice Exception message and stack trace:

Either:

AbpException: Could not find the bundle file '/libs/abp/core/abp.css' for the bundle 'Lepton.Global'! Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpTagHelperResourceService.ProcessAsync(ViewContext viewContext, TagHelper tagHelper, TagHelperContext context, TagHelperOutput output, List<BundleTagHelperItem> bundleItems, string bundleName) Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpBundleTagHelperService<TTagHelper, TService>.ProcessAsync(TagHelperContext context, TagHelperOutput output) Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, int i, int count) …

Or:

AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception) System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions) System.Net.Security.SslStream.ForceAuthenticationAsync<TIOAdapter>(TIOAdapter adapter, bool receiveFirst, byte[] reAuthenticationData, bool isApm) System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, bool async, Stream stream, CancellationToken cancellationToken)

Show raw exception details HttpRequestException: The SSL connection could not be established, see inner exception. System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, bool async, Stream stream, CancellationToken cancellationToken) System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request) System.Threading.Tasks.TaskCompletionSourceWithCancellation<T>.WaitWithCancellationAsync(CancellationToken cancellationToken) System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken) System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, bool async, CancellationToken cancellationToken) System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, bool disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.RequestAsync(ClientProxyRequestContext requestContext)

Show raw exception details AbpRemoteCallException: An error occurred during the ABP remote HTTP request. (The SSL connection could not be established, see inner exception.) See the inner exception for details. Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.RequestAsync(ClientProxyRequestContext requestContext) Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.RequestAsync<T>(ClientProxyRequestContext requestContext) Volo.Abp.Http.Client.ClientProxying.ClientProxyBase<TService>.RequestAsync<T>(string methodName, ClientProxyRequestTypeValue arguments) Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClientProxies.AbpApplicationConfigurationClientProxy.GetAsync() Volo.Abp.AspNetCore.Mvc.Client.MvcCachedApplicationConfigurationClient.<GetAsync>b__14_0() Volo.Abp.Caching.DistributedCache<TCacheItem, TCacheKey>.GetOrAddAsync(TCacheKey key, Func<Task<TCacheItem>> factory, Func<DistributedCacheEntryOptions> optionsFactory, Nullable<bool> hideErrors, bool considerUow, CancellationToken token) Volo.Abp.AspNetCore.Mvc.Client.MvcCachedApplicationConfigurationClient.GetAsync() Volo.Abp.AspNetCore.Mvc.Client.RemoteLanguageProvider.GetLanguagesAsync() Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync() Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Steps to reproduce the issue:

Admittedly I am new to microservices, Docker, WSL, NPM, and Tye. My development experience has been with tiered MVC deployed to IIS. But I have carefully followed the microservices template getting started guide (which still refers to a up.ps1 file instead of the run-tye.ps1 file) and I cannot get the projects to work when accessed.

I have executed the run-tye.ps1 file. Dependencies seemed to be downloaded and the apps and services started.

Upon encountering the certificate error, I tried multiple things offered on stack overflow including the the following:

  • Running etc\dev-cert\create-certificate.ps1
  • Running dotnet dev-certs https --clean
  • Running dotnet dev-certs https --trust
  • Copying the certificate to the Trusted Route Certification Authorities > Certificates folder in the Certificate Manager
  • Restarting several times
  • Abandoning the Tye configuration and setting up multiple startup projects in Visual Studio 2022 and trying to run the apps and services that way

None of these things have helped resolve the certificate error. I am performing all these actions on a brand-new laptop so this is the first solution I have tried to work with on this machine.

As far as the AbpException: Could not find the bundle file '/libs/abp/core/abp.css' for the bundle 'Lepton.Global'! goes, I have tried the following:

  • Running yarn and abp install-libs in the root directory.

Neither of these two commands solved the problem, though the yarn command did download some packages. The abp install-libs command resulted in a warning that I did not have NPM Installed though I have confirmed that I do have it installed by running npm -v right after the warning. Unfortunately I did not think about This at first and so I uninstalled and reinstalled Node and played with my path for a couple of hours thinking that this was part of the problem.

So I am in a bit of a loss at this point. What should I try to do next to resolve these two issues?

Thank you.

PS:Just a few more details:

  • I do have Docker Desktop installed
  • I am using the Alpine distro
  • I have not done any configuration of Alpine other than installing it through the Microsoft Store
  • I have gone to Settings > Resources > WSL Integration in the Docker Desktop application and Enabled integration with Alpine
  • I have run wsl.exe --set-default Alpine (I've lost my page describing this but I think that is the proper command)

What is the result when you run npm -v

PS C:\Users\passp> npm -v
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
8.11.0
PS C:\Users\passp>

The dev-certs is only working on domain localhost, can you share the full logs?

PS C:\Users\passp> cd D:\Century\Clients\PigglyWiggly\RPMS\PWADC.GoRPMS
PS D:\Century\Clients\PigglyWiggly\RPMS\PWADC.GoRPMS> .\etc\dev-cert\create-certificate.ps1
Trusting the HTTPS development certificate was requested. A confirmation prompt will be displayed if the certificate was not previously trusted. Click yes on the prompt to trust the certificate.
[1] Listing certificates from CurrentUser\My
[2] Found certificates: 1 certificate
    1) D6A8FF9E96302EC89AC86045A5F8EBC6EAA62D35 - CN=localhost - Valid from 2022-06-02 15:18:41Z to 2023-06-02 15:18:41Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[3] Checking certificates validity
[4] Valid certificates: 1 certificate
    1) D6A8FF9E96302EC89AC86045A5F8EBC6EAA62D35 - CN=localhost - Valid from 2022-06-02 15:18:41Z to 2023-06-02 15:18:41Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[5] Invalid certificates: no certificates
[6] Finished listing certificates.
[1] Listing certificates from LocalMachine\My
[2] Found certificates: no certificates
[3] Checking certificates validity
[4] Valid certificates: no certificates
[5] Invalid certificates: no certificates
[6] Finished listing certificates.
[8] Filtered certificates: 1 certificate
    1) D6A8FF9E96302EC89AC86045A5F8EBC6EAA62D35 - CN=localhost - Valid from 2022-06-02 15:18:41Z to 2023-06-02 15:18:41Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[9] Excluded certificates: no certificates
[14] Valid certificates: 1 certificate
    1) D6A8FF9E96302EC89AC86045A5F8EBC6EAA62D35 - CN=localhost - Valid from 2022-06-02 15:18:41Z to 2023-06-02 15:18:41Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[15] Selected certificate: D6A8FF9E96302EC89AC86045A5F8EBC6EAA62D35 - CN=localhost - Valid from 2022-06-02 15:18:41Z to 2023-06-02 15:18:41Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[23] Saving certificate 'D6A8FF9E96302EC89AC86045A5F8EBC6EAA62D35 - CN=localhost - Valid from 2022-06-02 15:18:41Z to 2023-06-02 15:18:41Z - IsHttpsDevelopmentCertificate: true - IsExportable: true' to localhost.pfx with private key.
[27] Writing the certificate to: localhost.pfx.
[29] Trusting the certificate to: D6A8FF9E96302EC89AC86045A5F8EBC6EAA62D35 - CN=localhost - Valid from 2022-06-02 15:18:41Z to 2023-06-02 15:18:41Z - IsHttpsDevelopmentCertificate: true - IsExportable: true.
[45] Adding certificate to the trusted root certification authority store.
[0] Event 30 was called with 1 argument(s), but it is defined with 0 parameter(s).
[30]
A valid HTTPS certificate is already present.
The certificate was exported to D:\Century\Clients\PigglyWiggly\RPMS\PWADC.GoRPMS\localhost.pfx
PS D:\Century\Clients\PigglyWiggly\RPMS\PWADC.GoRPMS> dotnet dev-certs https --clean
Cleaning HTTPS development certificates from the machine. A prompt might get displayed to confirm the removal of some of the certificates.
HTTPS development certificates successfully removed from the machine.
PS D:\Century\Clients\PigglyWiggly\RPMS\PWADC.GoRPMS>  dotnet dev-certs https --trust
Trusting the HTTPS development certificate was requested. A confirmation prompt will be displayed if the certificate was not previously trusted. Click yes on the prompt to trust the certificate.
The HTTPS developer certificate was generated successfully.
PS D:\Century\Clients\PigglyWiggly\RPMS\PWADC.GoRPMS>

Showing 1 to 10 of 43 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11