So are you saying don't use Angular for this? and just override what's in Themes/LeptonX/Layouts/Account in the MVC project?
Or are you saying that I would have to use the resource owner password flow if I want to do it in Angular?
I would like to replace the login and register page in MVC using Angular. I was just wondering if there is any guidance or documents in regards to this.
I did see this page, but it recommends using the resource owner password flow, which I would prefer not to. https://docs.abp.io/en/abp/latest/UI/Angular/Account-Module
And as mentioned, I would like to override these pages with my own designs.
Thank you
That seemed to be the issue. Even though the appsettings.secret.json file was loaded, which I confirmed, the key was not being loaded. Copying the license key to appsettings.json works. The issue with isolated function apps is that many errors that are not in-code, are swallowed, and the above generic message is displayed. It's an issue that's been reported many times already. https://github.com/Azure/azure-functions-dotnet-worker/issues/532#issuecomment-1384065083
I might either create a gist or simple guide for this. I lost almost a week trying to get this to work :)
The example you gave is for in-process worker functions. But I did update the code as follows, I am still getting an error on some modules, but the below works and I am able to inject IIdentityUserRepository and query it.
[Program.cs]
using Autofac;
using Autofac.Extensions.DependencyInjection;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Volo.Abp;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity;
using Volo.Abp.Threading;
using Sample.SecondProcessor;
var host = new HostBuilder()
    .UseServiceProviderFactory(new AutofacServiceProviderFactory())
    .AddAppSettingsSecretsJson()
    .UseAutofac()
    .ConfigureContainer<ContainerBuilder>(builder =>
    {
    })
    .ConfigureAppConfiguration((hostContext, config) =>
    {
        config.AddJsonFile("appsettings.json", optional: false);
    })
    .ConfigureServices(services =>
    {
        services.AddSingleton<ICancellationTokenProvider>(NullCancellationTokenProvider.Instance);
        services.AddSingleton<IAbpLazyServiceProvider,AbpLazyServiceProvider>();
        
        services.AddApplication<AzureFunctionProcessorModule>(x =>
        {
            x.UseAutofac();
        });        
        
        var serviceProvider = services.BuildServiceProvider();
        
        serviceProvider.GetRequiredService<IAbpApplicationWithExternalServiceProvider>().Initialize(serviceProvider);
    })
    .ConfigureFunctionsWorkerDefaults()
    .Build();
host.Run();
[SampleModule.cs]
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Volo.Abp.Autofac;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain;
using Volo.Abp.Identity;
using Volo.Abp.Identity.MongoDB;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict.Tokens;
using Volo.Abp.Threading;
using Volo.Abp.Uow;
using Sample.MongoDB;
namespace Sample.SecondProcessor;
[DependsOn(
    typeof(AbpIdentityDomainModule),
    typeof(AbpAutofacModule),
    typeof(AbpIdentityMongoDbModule),
    typeof(SampleApplicationContractsModule),
    //typeof(SampleMongoDbModule)
)]
public class AzureFunctionProcessorModule : AbpModule
{
    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
    }
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddTransient<IIdentityUserRepository, MongoIdentityUserRepository>();
        
        Configure<AbpUnitOfWorkDefaultOptions>(options =>
        {
            options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
        });
        
        Configure<AbpBackgroundJobOptions>(options =>
        {
            options.IsJobExecutionEnabled = false;
        });
        
        Configure<TokenCleanupOptions>(options =>
        {
            options.IsCleanupEnabled = false;
        });
    }
    
    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
    }
}
If I uncomment SampleMongoDbModule, it fails and I get the generic :
[2023-05-02T17:58:14.180Z] Language Worker Process exited. Pid=30853. [2023-05-02T17:58:14.180Z] dotnet exited with code 214 (0xD6). . [2023-05-02T17:58:14.277Z] Failed to start a new language worker for runtime: dotnet-isolated. [2023-05-02T17:58:14.277Z] System.Private.CoreLib: A task was canceled.
Otherwise it works. Also, most of the Pro modules fail with the same error. I thought it might be a license key issue? So I added .AddAppSettingsSecretsJson() and copied my key over. However, it still fails. Also note, that I had to set both IsJobExecutionEnabled and IsCleanupEnabled to false or else it would throw an exception as in the screenshot in my previous comment.
I believe this will work in In-process mode, but I don't want to have to downgrade my projects to NET 6.0.
Do you mind being a bit more specific? Where exactly are you referring to?
For example, the below produces the same error.
using Volo.Abp;
using Volo.Abp.Autofac;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using WholesaleFriendly.MongoDB;
namespace WholesaleFriendly.Processor;
[DependsOn(typeof(WholesaleFriendlyMongoDbModule))]
[DependsOn(typeof(AbpIdentityApplicationModule))]
[DependsOn(typeof(AbpAutofacModule))]
public class AzureFunctionProcessorModule : AbpModule
{
    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
    }
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
    }
    
    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
    }
}
I updated the code based upon the links that you've send. I am getting the error as below. I am trying to lookup a user, in the Azure Activity Function I have the following:
public CreateTestFunction(IIdentityUserRepository identityUserRepository, IProductRepository productRepository)
{
    _identityUserRepository = identityUserRepository;
    _productRepository = productRepository;
}
Exception:
Volo.Abp. AbpInitializationException Create breakpoint: An error occurred during the initialize Volo. Abp. Modularity. OnApplicationInitializationModuleLifecycleContributor phase of the module sVolo.Abp. BackgroundJobs. AbpBackgroundJobsModule, Volo. Abp.BackgroundJobs, Version=7.0.1.0, 2 Culture=neutral, PublicKeyToken=null: Object reference not set to an instance of an object.. See, § the inner exception for details. ---> System. NullReferenceException Create breakpoint : Object reference not set to an instance of an object. at Volo. Abp. BackgroundWorkers. BackgroundWorkerBase. get_Logger at Volo.Abp. BackgroundWorkers. BackgroundWorkerBase. StartAsync(CancellationToken cancellationToken)
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Volo.Abp;
using Volo.Abp.Threading;
using Sample.Processor;
using Sample.Processor.Options;
var hostBuilder = new HostBuilder()
    .ConfigureFunctionsWorkerDefaults()
    .ConfigureAppConfiguration((hostContext, config) =>
    {
        config.AddJsonFile("appsettings.json", optional: false);
    })
    .ConfigureServices(async (hostBuilderContext, services) =>
    {
        services.AddOptions();
        await services.AddApplicationAsync<AzureFunctionProcessorModule>(x =>
        {
            x.Services.ReplaceConfiguration(hostBuilderContext.Configuration);
        });
        
        services.Configure<ProcessorOptions>(hostBuilderContext.Configuration.GetSection(nameof(ProcessorOptions)));
        services.AddLogging();
    });
var host = hostBuilder.Build();
var application = host.Services.GetRequiredService<IAbpApplicationWithExternalServiceProvider>();
var applicationLifetime = host.Services.GetRequiredService<IHostApplicationLifetime>();
applicationLifetime.ApplicationStopping.Register(() =>
{
    AsyncHelper.RunSync(() => application.ShutdownAsync());
});
applicationLifetime.ApplicationStopped.Register(() =>
{
    application.Dispose();
});
await application.InitializeAsync(host.Services);
host.Run();
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Volo.Abp.Autofac;
using Volo.Abp.Identity;
using Volo.Abp.Identity.MongoDB;
using Volo.Abp.Modularity;
using Sample.MongoDB;
namespace Sample.Processor;
[DependsOn(typeof(WholesaleFriendlyMongoDbModule))]
[DependsOn(typeof(AbpIdentityApplicationModule))]
[DependsOn(typeof(AbpAutofacModule))]
public class AzureFunctionProcessorModule : AbpModule
{
    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
    }
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddTransient<IIdentityUserRepository, MongoIdentityUserRepository>();
    }
    
    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
    }
}
Also, which nugets should I include in this project?
Are there any guidelines for integrating ABP with an Azure Durable Function? I am trying to call my Application Services and Repositories.
This is my Program.cs
var host = new HostBuilder()
.ConfigureFunctionsWorkerDefaults(x => x.UseMiddleware(), options => {})
.ConfigureAppConfiguration((hostContext, config) =>
{
   config.AddJsonFile("appsettings.json", optional: false);
})
.ConfigureServices((hostBuilderContext, services) =>
{
   services.AddOptions();
   services.AddApplicationAsync(x =>
   {
       x.Services.ReplaceConfiguration(hostBuilderContext.Configuration);
   });
    services.Configure<ProcessorOptions>(hostBuilderContext.Configuration.GetSection(nameof(ProcessorOptions)));
    var processorOptions = hostBuilderContext.Configuration.Get<ProcessorOptions>();
    services.AddLogging();
})
.Build();
host.Run();
I am getting a lot of exceptions with trying to access any of my Repositories.
If you're creating a bug/problem report, please include followings:
Would it be possible to use both menus, the top and side menu at the same time?
As part of my application, I have different tools, which I would like to reside on the top menu. When the user clicks on a tool, I would like the side menu to change to reflect the valid options for that tool. I believe this is possible with the Blasorise Bar component.
Thanks.
Let me clarify my last question. I would like to query on the extra property. So for example, if I wanted to query on where fullname = "Tom" or stripeId = "123".
 
                                