Starts in:
1 DAY
22 HRS
37 MIN
31 SEC
Starts in:
1 D
22 H
37 M
31 S

Activities of "Priyanka"

hi

You should remove all Identity Server-related code.

You can create a new template project to compare the code.

yes, to remove identity server related code, I want to know, what would be the replacement of these classes: AbpIdentityWebModule AbpAccountPublicWebIdentityServerModule AbpIdentityServerWebModule IdentityMenuNames AbpIdentityServerMenuNames

It is not present in this link as well -https://docs.abp.io/en/abp/latest/Migration-Guides/OpenIddict-Step-by-Step

There is no account module in your Web project.

Please add <PackageReference Include="Volo.Abp.Account.Pro.Public.Web.OpenIddict" Version="8.1.1" /> to it and try again.

You can create a new template project to compare the csproj file.

After adding above package reference, I'm able to get the class, but in my existing function this is parameter
and I return this

now in OpenIddictSupportedLoginModel, this is the parameter should I use this to return

Also, what is the replacement of these class highlighted in red

hi

Can you also share the screenshot of the project structure? Do you have AuthServer project?

This is the project structure, I don't have AuthServer.

Volo.Abp.Account.Pro.Public.Web.OpenIddict No Package found for this

Please find csproj file below

<Project Sdk="Microsoft.NET.Sdk.Web">

	<Import Project="..\..\common.props" />

	<PropertyGroup>
		<TargetFramework>net8.0</TargetFramework>
		<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
		<RootNamespace>eFC.Web</RootNamespace>
		<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
		<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
		<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
		<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
		<PreserveCompilationContext>true</PreserveCompilationContext>
		<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
		<PreserveCompilationReferences>true</PreserveCompilationReferences>
		<UserSecretsId>48d09d73-95fd-4623-9199-be2c7853284a</UserSecretsId>
		<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
		<DockerfileContext>..\..</DockerfileContext>
		<OutputType>Exe</OutputType>
	</PropertyGroup>

	<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
		<LangVersion>9.0</LangVersion>
	</PropertyGroup>
	<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
		<LangVersion>9.0</LangVersion>
	</PropertyGroup>
	<ItemGroup>
		<Compile Remove="Logs\**" /> 
		<Content Remove="Logs\**" /> 
		<EmbeddedResource Remove="Logs\**" /> 
		<None Remove="Logs\**" /> 
		<None Remove="Controller\" />
		<None Remove="Pages\Account\" />
		<None Remove="Pages\ADFS\" />
		<None Remove="System.DirectoryServices" />
		<None Remove="System.DirectoryServices.AccountManagement" />
		<None Remove="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" />
		<None Remove="TextTemplate\ETBSBodyTemplate.tpl" />
		<None Remove="TextTemplate\ETBSColumnTemplate.tpl" />
		<None Remove="TextTemplate\ETBSHeaderTemplate.tpl" />
		<None Remove="TextTemplate\ETBSPreviewBodyTemplate.tpl" />
		<None Remove="TextTemplate\ETBSTotalEstimationTemplate.tpl" />
		<None Remove="TextTemplate\FCTypeContactNoEmail.tpl" />
		<None Remove="TextTemplate\FooterTemplate.tpl" />
		<None Remove="TextTemplate\UserTeamEmail.tpl" />
		<None Remove="TextTemplate\VisitCancellationEmail.tpl" />
	</ItemGroup>

	<ItemGroup>
		<Content Include="Pages\**\*.js">
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
		</Content>
		<Content Include="Pages\**\*.css">
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
		</Content>
	</ItemGroup>

	<ItemGroup>
		<Compile Remove="eFCAbpClaimsPrincipalContributor.cs" />
		<Compile Remove="eFCAbpClaimsService.cs" />
		<Compile Remove="Pages\UploadedFiles\EditModal.cshtml.cs" />
	</ItemGroup>

	<ItemGroup>
		<Content Remove="Pages\UploadedFiles\EditModal.cshtml" />
	</ItemGroup>

	<ItemGroup>
		<PackageReference Include="AspNetCore.HealthChecks.UI" Version="8.0.1" />
		<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.1" />
		<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="8.0.1" />
		<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
		<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
		<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
		<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
		<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
		<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.4" />
		<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.4" />
		<PackageReference Include="Microsoft.AspNetCore.Authentication.Twitter" Version="8.0.4" />
		<PackageReference Include="System.DirectoryServices.AccountManagement" Version="8.0.0" />
		<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="8.0.4" />
	</ItemGroup>

	<ItemGroup>
		<ProjectReference Include="..\eFC.Application\eFC.Application.csproj" />
		<ProjectReference Include="..\eFC.HttpApi\eFC.HttpApi.csproj" />
		<ProjectReference Include="..\eFC.EntityFrameworkCore\eFC.EntityFrameworkCore.csproj" />
		<PackageReference Include="Volo.Abp.Autofac" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.Swashbuckle" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.FeatureManagement.Web" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.Account.Pro.Admin.Web" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.AuditLogging.Web" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.Identity.Pro.Web" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.LeptonTheme.Management.Web" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.IdentityServer.Web" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.LanguageManagement.Web" Version="8.1.1" />
		<PackageReference Include="Volo.Saas.Host.Web" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton" Version="8.1.1" />
		<PackageReference Include="Volo.Abp.TextTemplateManagement.Web" Version="8.1.1" />
	</ItemGroup>

	
</Project>

olo.Abp.Account.Web.Pages.Account.OpenIddictSupportedLoginModel

This is also giving the error

Let me know If I need to add some reference or exact name of class. I'm not getting anything in suggestion.

Thank you.

Hi,

Because ABP uses the CurrentUser.Id as the LastModifierId value.

You can try:

private ICurrentPrincipalAccessor _currentPrincipalAccessor; 
 
.... 
 
 
var claims = new List<Claim>(){ new Claim(AbpClaimTypes.UserId,user.Id)}; 
using(_currentPrincipalAccessor.Change(claims)) 
{ 
    _repository.UpdateAsync(..., autoSave: true) 
} 

Thank you. It is updating now.

Sorry, should be CompleteAsync. (because there is no IDE code prompt here)

ok, thank you for the solution. It is working.

Hi,

you need to roll back the main transaction, and create a new transaction to record the log.

try 
{ 
   await _repositpry.InsertAsync(...xxxx, autoSave: true) 
} 
catch(exception e) 
{ 
   await _unitOfWorkManager.Current.RollbackAsync(); 
} 
final 
{ 
  using (var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: true)) 
  {  
       ..... 
        
       await uow.CommitAsync(); 
  } 
} 

Hi, Thank you for the solution but uow.CommitAsync() is having compile time error

Can we use CompleteAsync? What is the difference between commit and complete here in this case ?

i meant something like this here;

https://github.com/serilog-mssql/serilog-sinks-mssqlserver

does that work for you?

Log event is already there, we have case where our service is called by external user so we are keeping log of that service where we need to keep request message, response message, current status, messageId etc and this table data is accessible to user to know the status of request hence we are keeping in separate table. Please help me with the solution to insert data in my log table without any exception of try block transaction.

why don't you configure a serilog sink to db? and just call Logger.LogError or something?

We have requirement to keep log in DB. While Inserting in DBlog table I'm getting the same exception which I want to log in DB table.

Showing 91 to 100 of 116 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06