Hi,
The ABP CLI v4.4 is based on .NET 5.0, you can try to upgrade ABP CLI to 5.0.0
Hi,
Can you try testing with the following code? it works for me.
public class IndexModel : MyProjectNamePageModel
{
private readonly ICurrentPrincipalAccessor _currentPrincipalAccessor;
private readonly SignInManager<IdentityUser> _signInManager;
private readonly IIdentityUserRepository _userRepository;
public IndexModel(
ICurrentPrincipalAccessor currentPrincipalAccessor,
SignInManager<IdentityUser> signInManager,
IIdentityUserRepository userRepository)
{
_currentPrincipalAccessor = currentPrincipalAccessor;
_signInManager = signInManager;
_userRepository = userRepository;
}
public async Task OnGetAsync(bool setShowedWelcomePopup)
{
if (CurrentUser.IsAuthenticated)
{
var user = await _userRepository.FindAsync(CurrentUser.GetId());
if (setShowedWelcomePopup)
{
await _signInManager.SignOutAsync();
await _signInManager.SignInAsync(user, true);
}
}
}
}
public class JureezClaimsPrincipalContributor : IAbpClaimsPrincipalContributor, ITransientDependency
{
public async Task ContributeAsync(AbpClaimsPrincipalContributorContext context)
{
var currentTenant = context.ServiceProvider.GetRequiredService<ICurrentTenant>();
context.ClaimsPrincipal.Identities.First().AddClaim(new Claim("WelcomePopupShowedClaimName", currentTenant.Id != null ? "false" : "true"));
}
}
Hi,
You can try use the HardDeleteAsync
method. see: https://github.com/abpframework/abp/blob/e3e1779de6df5d26f01cdc8e99ac9cbcb3d24d3c/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs#L50
HI,
You can try use the Change
method of currentPrincipalAccessor
Example:
using(_currentPrincipalAccessor.Change(...))
{
await _httpContextAccessor.HttpContext.SignOutAsync();
await _httpContextAccessor.HttpContext.SignInAsync(_currentPrincipalAccessor.Principal);
}
Hi,
We found the problem and will fix it in the next version. your ticket refunded.
Fow now, you can try:
Open <YourProjectName>HttpApiClientModule
:
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<<YourProjectName>HttpApiClientModule>();
});
Put the JSON file in the ClientProxies
directory of .HttpApi.Client
project and set it as an embedded file.
BTW, you can delete these changes when you upgrade to next version.
Hi,
I will check it.
The guide: https://github.com/abpio/abp-commercial-docs/pull/146
Hi,
I don't know about your project details, can you create a new project to reproduce the problem and share to me? shiwei.liang@volosoft.com thanks.
Hi,
Can also you try and create&apply migration file:
builder.ConfigureLanuageManagement(options => {options.TablePrefix= "";});
We have remove ModelBuilderConfigurationOptions
classes in the 5.0, but in the 4.4 you need to use both.
Hi,
Sorry I'm late, I'm just on vacation.
It looks like you are createing CSV files in the JS, I think there is no problem.
But you want export Excel instead of CSV, you need to return file stream in the Controller
.
Example:
public IActionResult ExportExcel()
{
string contentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
string fileName = "Report.xlsx";
var workbook = new XLWorkbook();
IXLWorksheet worksheet = workbook.Worksheets.Add("sheet1");
//.....
using (var stream = new MemoryStream())
{
workbook.SaveAs(stream);
var content = stream.ToArray();
return File(content, contentType, fileName);
}
}