Starts in:
2 DAYS
9 HRS
20 MIN
54 SEC
Starts in:
2 D
9 H
20 M
54 S

Activities of "pvaz"

Well, not so easier, but ok.

I've create the following files in the following projects/folders:

  • Project.Domain
    • TicketStatuses
      • ITicketStatusRepository.cs
      • TicketStatus.cs
      • TicketStatusAlreadyExistsException.cs
      • TicketStatusManager.cs
  • Project.Domain.Shared
    • TicketStatuses
      • TicketStatusConsts.cs
  • Project.EntityFrameworkCore
    • EfCoreTicketStatusRepository.cs
  • Project.Application
    • TicketStatuses
      • TicketStatusesAppService.cs
  • Project.Application.Contracts
    • TicketStatuses
      • CreateTicketStatusDto.cs
      • ITicketStatusAppService.cs
      • TicketStatusDto.cs
      • UpdateTicketStatusDto.cs

In Project.Application on file ProjectApplicationAutoMapperProfile.cs I've added

CreateMap<TicketStatus, TicketStatusDto>()

In Project.EntityFrameworkCore -> EntityFrameworkCore - IndoDbContext.cs - public DbSet<TicketStatus> TicketStatuses { get; set; }

  • IndoDbContextModelCreatingExtensions builder.Entity<TicketStatus>(b => { b.ToTable(IndoConsts.DbTablePrefix + "TicketStatuses", IndoConsts.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Description).HasColumnName(nameof(TicketStatus.Description)).IsRequired(); b.Property(x => x.CloseTicket).HasColumnName(nameof(TicketStatus.CloseTicket)); });

    Project is compiling without any error.

    The I went to the command shell, Project.EntityFrameworkCore, and done the following command

    dotnet ef migrations add Added_TicketStatuses

Hi,

I think it's better to share the project with you, so you can test easier and for sure spot the problem quickier

Paulo

Yes I am

  • ABP Framework version: v4.4.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

When I'm trying to add a new migration using the command line dotnet ef migrations add TicketStatuses I get the following error:

Unable to create an object of type 'IndoDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728

I have all well defined on the frameworkcore

namespace Indo.TicketStatus { public class EfCoreTicketStatusRepository : EfCoreRepository<IndoDbContext, TicketStatuses, Guid>, ITicketStatusRepository { public EfCoreTicketStatusRepository( IDbContextProvider<IndoDbContext> dbContextProvider) : base(dbContextProvider) { } } }

What's missing ?

What is the best way to update the packages on the modules ? I tried to add the solution for each modules on abp suite web and failed.

Changing directly on the solution also did not solved because on compilation gives error.

And how to handle with the changes on dbmigration, tables and new fields on project update ? Since on version 4.4.0 the process is changed.

I did not check the modules, tought that the abp suite was also upgrading the modules, but seems not.

I'll do it and try again, thanks

Hi,

Yes all packages were upgraded, deleted all binaries, restored and compiled with no errors.

Going to provide the project to the email next

  • ABP Framework version: v4.4.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

After updating my current project from v.4.3.0 to v4.4.0 doing upgrade, npm and nuget update, cleaned binaries and recompiled without any errors, I cannod run the web project.

When starting is giving me the following error:

2021-08-18 22:18:40.474 +01:00 [INF] Starting web host.
2021-08-18 22:18:42.360 +01:00 [FTL] Host terminated unexpectedly!
System.TypeLoadException: Could not load type 'Volo.Abp.TextTemplating.ITemplateRenderer' from assembly 'Volo.Abp.TextTemplating, Version=4.4.0.0, Culture=neutral, PublicKeyToken=null'.
   at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
   at System.Reflection.RuntimeConstructorInfo.get_Signature()
   at System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
   at System.Reflection.RuntimeConstructorInfo.GetParameters()
   at Autofac.Core.Activators.Reflection.ConstructorBinder..ctor(ConstructorInfo constructorInfo)
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ConfigurePipeline(IComponentRegistryServices componentRegistryServices, IResolvePipelineBuilder pipelineBuilder)
   at Autofac.Core.Registration.ComponentRegistration.BuildResolvePipeline(IComponentRegistryServices registryServices, IResolvePipelineBuilder pipelineBuilder)
   at Autofac.Core.Registration.ComponentRegistration.BuildResolvePipeline(IComponentRegistryServices registryServices)
   at Autofac.Core.Registration.ComponentRegistryBuilder.Build()
   at Autofac.ContainerBuilder.Build(ContainerBuildOptions options)
   at Volo.Abp.Autofac.AbpAutofacServiceProviderFactory.CreateServiceProvider(ContainerBuilder containerBuilder)
   at Microsoft.Extensions.Hosting.Internal.ServiceFactoryAdapter`1.CreateServiceProvider(Object containerBuilder)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at G3TechSupport.Web.Program.Main(String[] args) in C:\Dev\GTech\GTechSupport\aspnet-core\src\GTechSupport.Web\Program.cs:line 30

Error is 500.30 - ASP.NET Core app failed to start

Before was working well.

Thanks, Paulo

Hi,

solved this way using your advice:

var redirectUrl = UriHelper.BuildAbsolute(HttpContext.Request.Scheme, HttpContext.Request.Host, "/Account/Login"); await HttpContext.ChallengeAsync(new AuthenticationProperties { RedirectUri = redirectUrl });

return;`

Hi Maliming,

thank you for your quick reply.

Perhaps my question I was not clear. When the user is not authenticated to redirect to /Account/Login.

Using your example I get:

"An unhandled exception occurred while processing the request. InvalidOperationException: No authentication handler is registered for the scheme 'oidc'. The registered schemes are: idsrv, idsrv.external, Abp.ConfirmUser, Identity.Application, Identity.External, Identity.TwoFactorRememberMe, Identity.TwoFactorUserId, Bearer, Google, Microsoft, Twitter. Did you forget to call AddAuthentication().AddSomeAuthHandler? Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, string scheme, AuthenticationProperties properties)"

Thx

Showing 1 to 10 of 28 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06