Activities of "maliming"

hi pvaz

You are using the Tiered Structure application, please refer to the documentation to learn how to run it.

https://docs.abp.io/en/commercial/latest/startup-templates/application/solution-structure#dbmigrator-project

https://docs.abp.io/en/commercial/latest/startup-templates/application/solution-structure#tiered-structure

https://docs.abp.io/en/commercial/latest/startup-templates/application/solution-structure#how-to-run-1

hi pvaz

If you get other questions or problems, please feel free to feedback. Thank you.

Access to the path 'C:\Users\Paulo Vaz.dotnet\tools\abp-suite.exe' is denied.

This looks like a permission issue in windows.

You can try to use the administrator to open the cmd and execute the abp suite install command.

hi

You can call the methods of the application service layer in the web layer. In the application service layer, you can use repositoriy to read and write databases.

I suggest you start with the documentation

https://docs.abp.io/en/abp/latest/Domain-Driven-Design https://docs.abp.io/en/abp/latest/Application-Services https://docs.abp.io/en/abp/latest/Repositories

hi

Can you share some code to reproduce the problem?

hi

You can take a look at this https://support.abp.io/QA/Questions/160/How-to-customize-an-ABP-project

hi @michael.sudnik

The below code is the patch. I will fix this in 4.0.

using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Volo.Abp.Account;
using Volo.Abp.Account.Public.Web.Pages.Account;
using Volo.Abp.DependencyInjection;
using IdentityUser = Volo.Abp.Identity.IdentityUser;

namespace MyApp.Web
{
      [ExposeServices(typeof(MyRegisterModel), typeof(RegisterModel))]
      public class MyRegisterModel : RegisterModel
      {
            protected override async Task RegisterExternalUserAsync(ExternalLoginInfo externalLoginInfo, string emailAddress)
            {
                  var user = new IdentityUser(GuidGenerator.Create(), emailAddress, emailAddress, CurrentTenant.Id);

                  (await UserManager.CreateAsync(user)).CheckErrors();
                  (await UserManager.AddDefaultRolesAsync(user)).CheckErrors();

                  if (!user.EmailConfirmed)
                  {
                        await AccountAppService.SendEmailConfirmationTokenAsync(
                              new SendEmailConfirmationTokenDto
                              {
                                    AppName = "MVC",
                                    Email = emailAddress,
                                    ReturnUrl = ReturnUrl,
                                    ReturnUrlHash = ReturnUrlHash
                              }
                        );
                  }

                  var userLoginAlreadyExists = user.Logins.Any(x =>
                        x.TenantId == user.TenantId &&
                        x.LoginProvider == externalLoginInfo.LoginProvider &&
                        x.ProviderKey == externalLoginInfo.ProviderKey);

                  if (!userLoginAlreadyExists)
                  {
                        user.AddLogin(new UserLoginInfo(
                                    externalLoginInfo.LoginProvider,
                                    externalLoginInfo.ProviderKey,
                                    externalLoginInfo.ProviderDisplayName
                              )
                        );

                        (await UserManager.UpdateAsync(user)).CheckErrors();
                  }

                  await SignInManager.SignInAsync(user, isPersistent: true);
            }
      }
}

hi

It seems there is a problem with mongodb, I will check it. Thank you

hi @rachanee-mwp

You can create a custom ConfigurationSettingValueProvider then read settings via underscore name.


public override void ConfigureServices(ServiceConfigurationContext context)
{
	Configure<AbpSettingOptions>(options =>
	{
		options.ValueProviders.InsertAfter(typeof(ConfigurationSettingValueProvider), typeof(MyConfigurationSettingValueProvider));
	});
}


public class MyConfigurationSettingValueProvider : ISettingValueProvider, ITransientDependency
{
	public const string ConfigurationNamePrefix = "Settings:";

	public const string ProviderName = "MC";

	public string Name => ProviderName;

	protected IConfiguration Configuration { get; }

	public MyConfigurationSettingValueProvider(IConfiguration configuration)
	{
		Configuration = configuration;
	}

	public virtual Task<string> GetOrNullAsync(SettingDefinition setting)
	{
		return Task.FromResult(Configuration[ConfigurationNamePrefix + setting.Name.Replace(".", "_")]);
	}

	public Task<List<SettingValue>> GetAllAsync(SettingDefinition[] settings)
	{
		return Task.FromResult(settings.Select(x => new SettingValue(x.Name, Configuration[ConfigurationNamePrefix + x.Name.Replace(".", "_")])).ToList());
	}
}

hi

I create a mvc project using 4.0.0-rc.3, When I register with my email, it will automatically log in when I log in again.

! 4.0.0 has not yet released the official version, RC is for testing only.

dotnet tool uninstall --global Volo.Abp.Cli && dotnet tool install --global Volo.Abp.Cli --version 4.0.0-rc.3
abp new MyApp -t app-pro -u mvc --mobile none --database-provider ef --csf --preview

Showing 7601 to 7610 of 7729 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30