Base solution for your next web application

Activities of "Astech"

Hi,

We are using widgets with the standard size/positioning provided by the framework, however when you start to reduce the screen width it becomes incomprehensible. Is there an existing feature that would automatically rescale these widgets to fit nicely? I would expect to see a single column of widgets at this point. The demo version seems to have this scale automatically but the html element looks a bit different. We would like to avoid going down the route of custom meda css code.

Please find attached some images of the problem.

Thanks!

Desktop resolution:

Shrinking screen down to a mobile device:

HTML of the widgets:

We have just upgraded our solutions ABP nuget packages to version 10.

Since the upgrade we are getting errors all over the place for properties that are not provided to inputs but which are now being enforced as required. The EditUserInput for example has a property called FullName:

 public class EditUserInput : EntityDto<long>
 {
     [StringLength(AbpUserBase.MaxNameLength)]
     public string Name { get; set; }

     public string FullName { get; set; } 
     
     ...     
}

Our application was quite happy not recieving a value for this before, but now we get the following error on user save:

Your request is not valid!
The following errors were detected during validation. - The FullName field is required.

The FullName property can probably be removed from that example, however we are getting this all over the place including for the ResetPassword page load:

Your request is not valid!
The following errors were detected during validation. - The Password field is required. - The ResetCode field is required. - The SingleSignIn field is required.

* The Password field is required.(password)
* The ResetCode field is required.(resetCode)
* The SingleSignIn field is required.(singleSignIn)
public class ResetPasswordInput: IShouldNormalize
{
    public long UserId { get; set; }

    public string ResetCode { get; set; }
    public DateTime ExpireDate { get; set; }

    [DisableAuditing]
    public string Password { get; set; }

    public string ReturnUrl { get; set; }

    public string SingleSignIn { get; set; }
 ...   
}

We have a custom repository that we would like to use everywhere. However, when we try to change a repository that is being passed to a base class we are having issues. Please see below as an example in LoginManager:

public class LogInManager : AbpLogInManager<Tenant, Role, User>
{
    public LogInManager(IOurCustomRepository<Tenant> tenantRepository) 
                                        : base(tenantRepository)
    {
        ...
    }
}

This results in a compile time error of

Argument 3: cannot convert from 'OurProject.Repositories.IOurCustomRepository<OurProject.MultiTenancy.Tenant>' to 'Abp.Domain.Repositories.IRepository<OurProject.MultiTenancy.Tenant>'

We have also tried casting the repository when passed to base:

public class LogInManager : AbpLogInManager<Tenant, Role, User>
{
    public LogInManager(IOurCustomRepository<Tenant> tenantRepository) 
                                        : base((IRepository<Tenant>)tenantRepository)
    {
        ...
    }
}

This allows the code to build but results in the following runtime error:

ComponentActivator: could not instantiate OurProject.Authorization.LogInManager
 ---> System.InvalidCastException: Unable to cast object of type 'OurProject.EntityFrameworkCore.Repositories.OurCustomRepository`1[OurProject.MultiTenancy.Tenant]' to type 'Abp.Domain.Repositories.IRepository`1[OurProject.MultiTenancy.Tenant]'.

How can we use our custom repository in this way while still satifying the base? I am aware that we can change the registration of IRepository so that a different implementation is used via Dependency Injection however we wish to specify our own custom repository in this way.

It's important to add that our custom repository does inherit from IRepository:

public interface IOurCustomRepository<TEntity, TPrimaryKey> : IRepository<TEntity, TPrimaryKey> where TEntity : class, IEntity<TPrimaryKey>

This is why we believe this should be possible?

Thank you

Hi, I have been getting the following error in my dev azure pipeline.

'Congresso.Documents.DocumentManager' is waiting for the following dependencies:

Service 'Microsoft.AspNetCore.SignalR.IHubContext`1[[Congresso.Documents.DocumentHub, Congresso.Core, Version=12.0.0.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.

at Castle.MicroKernel.Handlers.DefaultHandler.AssertNotWaitingForDependency() at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromKernelByType(CreationContext context, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromKernelByType(CreationContext context, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context) at Castle.Windsor.MsDependencyInjection.MsScopedLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, Arguments additionalArguments, IReleasePolicy policy, Boolean ignoreParentContext) at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, Boolean isOptional) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.AbpZeroIdentityBuilderExtensions.<>c__DisplayClass0_01.&lt;AddAbpTenantManager&gt;b__0(IServiceProvider provider) at Castle.MicroKernel.ComponentActivator.FactoryMethodActivator1.Instantiate(CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden) at Castle.Windsor.MsDependencyInjection.MsScopedLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, Arguments additionalArguments, IReleasePolicy policy, Boolean ignoreParentContext) at Abp.Events.Bus.EventBus.TriggerHandlingException(IEventHandlerFactory handlerFactory, Type eventType, IEventData eventData, List`1 exceptions) at Abp.Events.Bus.EventBus.Trigger(Type eventType, Object eventSource, IEventData eventData) at Abp.Events.Bus.Entities.EntityChangeEventHelper.TriggerEventWithEntity(Type genericEventType, Object entity, Boolean triggerInCurrentUnitOfWork) at Abp.Events.Bus.Ent

[AbpAuthorize] public class DocumentManager : CongressoDomainServiceBase, IDocumentManager {

private readonly IHubContext&lt;DocumentHub&gt; _documentHub;

public DocumentManager(
    IHubContext&lt;DocumentHub&gt; documentHub,
   )
{
    _documentHub = documentHub;
}


public class DocumentHub : Hub
{
}

}

Any suggestions?

Thanks!

Is there any reason why we could not consolidate there attributes and just have one for system wide authorization? Or is it necessary to use a different one in the MVC project to the application service?

Thanks

I'm trying to access a string from this object property:

"#if(" + (IsGranted("#=EntitySearch.ViewPermissionName#")).ToString().ToLower() + "){#" +

But I'm getting the following error as it's trying to search for the literal string instead of the property.

Abp.AbpException: There is no permission with name: #=EntitySearch.ViewPermissionName#

This works fine so I'm wondering if it's the IsGranted wrapper breaking it?

"#=EditModalButtonTemplate('EntitySearch.EditModalFunctionName', EntitySearch.Id)#"

The full grid:

                    @(Html.Kendo().Grid&lt;SearchViewModel&gt;().Name("EntitySearchList")
                        .DataSource(dataSource => dataSource
                            .Custom()
                            .Transport(transport =>  { transport.Read(read => read.Url(@Url.Action("Search_Read", "Searches")).DataType("json").Data("additionalData")); })
                            .Schema(schema => { schema.Model(m => m.Id("EntitySearchModel.Id")); schema.Data("Result.Result.Data").Total("Result.Result.Total"); })
                        )
                        .Columns(columns =>
                        {
                            columns.Bound(p => p.EntitySearch.Id).Title(" ").Filterable(false).Sortable(false).IncludeInMenu(false).HtmlAttributes(new { @class = "actions-column-cell" }).ClientTemplate(

                            "#if(" + (IsGranted("#=EntitySearch.ViewPermissionName#")).ToString().ToLower() + "){#" +

                            "#=ViewLinkButtonTemplate('" + @Url.Action("EntitySearch.ControllerViewFunctionName", "EntitySearch.ControllerName") + "', EntitySearch.Id" + ")#" +

                            "#}" +

                            "#=EditModalButtonTemplate('EntitySearch.EditModalFunctionName', EntitySearch.Id)#" +

                            "#=HistoryModalButtonTemplate(EntitySearch.Id, EntitySearch.Name, '" + @EntityTypeFullNames.Team.ToString() + "')#");

                            columns.Bound(p => p.EntitySearch.Id).IncludeInMenu(false);
                            columns.Bound(p => p.EntitySearch.SearchTypeDisplayName).IncludeInMenu(false);
                            columns.Bound(p => p.EntitySearch.Name).IncludeInMenu(false);
                        })
                        .Pageable()
                        .Events(events => events.DataBound("onDataBound"))
                        .NoRecords(x => x.Template("&lt;div class=&#39;empty-grid&#39;&gt;" + string.Format(@L("NoSomethingFound"),@L("CompletedActions").ToLower()) + "&lt;/div&gt;"))

                    )

We are trying to map an object with its child collection:

This always used to work, however all of a sudden we cannot map child collections. Can anyone help?

We have the following file loading on every page load. It is incredibly large and causing long delays. Can anyone shine a light on why this is needed, why it is so large and what we can do to rectify the situation please? Thank you. (Image alt text: /AbpServiceProxies/GetAll - 59MB)

We are using MicrosoftIdentity and Microsoft Graph to sign in our users: MVC Project - AuthConfigurer: Everything is working fine, users can sign in, use Graph and [AbpUserLogins] is being populated: But [AbpUserTokens] is not being populated with the access token:

I have tried to insert the token manually, but the constructor for UserToken is protected:

Can anyone tell me how we should be putting the token into AbpUserTokens? We can create our own similar table to do the same thing but seems unnecesary if there is already the functioanlity to push the access tokens in in ABP.

Thanks,

Hi,

With the people behind Moment.js even advising against using it, are there any plans to remove from ASP Net Zero? Or could be remove ourselves without any significant loss in functionality around subscriptions, notifications etc? The payload of both moment with locales and data are causing our bundle size to be much larger than it should be.

Thanks

Showing 1 to 10 of 29 entries