Base solution for your next web application

Activities of "vladsd"

Is there are easy way to remap services names and uris. For example, I want remap OrganizationUnit to be PreferenceUnit and all APIs associated with OrganizationUnit to be Preference, I am also not a big fan of long path to api. I would like /vX/subject/action As you can see I added versioning to api.

Please advise if you know, thanks a lot.

Question

Is there good tool to use to author help pages like ASP.NET Zero website?

I see md files but I cannot figure out how to generate html files?

Thanks.

I understand that I can define in code settings with SettingDefinition. What if I do not know what kind of settings Tenants wants, then I would like the ability to let tenant to define those settings. Have anyone implemented it? Or its a new feature? Can SettingDefinition be loaded or added on the fly? Or only in the init stage?

Thanks.

I would like to extend feature properties, for example with Display Order and Image.

My FeatureMetadata is extended:

public class FeatureMetadata
    {
        public const string CustomFeatureKey = "FeatureMetadata";

        public FeatureMetadata()
        {
            TextHtmlColor = value => "inherit";
            IsVisibleOnPricingTable = false;
            Image = "https://<default_image_path>.png";
            Order = 0;
        }

        public Func<string, ILocalizableString> ValueTextNormalizer { get; set; }

        public bool IsVisibleOnPricingTable { get; set; }

        public Func<string, string> TextHtmlColor { get; set; }
        public string Image { get; set; }
        public int Order { get; set; }
    }

My DTO is extended:

public class FlatFeatureSelectDto
    {
        public string ParentName { get; set; }

        public string Name { get; set; }

        public string DisplayName { get; set; }

        public string Description { get; set; }

        public string DefaultValue { get; set; }

        public IInputType InputType { get; set; }

        public string TextHtmlColor { get; set; }

        public string Image { get; set; }

        public int Order { get; set; }
    }

But when mapping is run, it does not automap

var flatFeatures = ObjectMapper
                .Map<List<FlatFeatureSelectDto>>(features)
                .OrderBy(f => f.Order)
                .ToList();

What am I missing. Its a simple use case for features, I want to order them and display something next to it in edition selections.

Thanks for insights.

Question

When you setup edition to have monthly and annual price and go edit again it fails to show price you set. While price is set in database correctly, mapping between database object and dto object fails to map decimals. Here is a link where it fails.

editionEditDto = ObjectMapper.Map<EditionEditDto>(edition);

edition has values for monthlyprice and annualprice, while editionEditDto has them as nulls after mapping.

Any advise how to fix this bug?

I have implemented custom resolver, catch all situation, resolves to default tenant id. See

//https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy
    public class DefaultTenantResolveContributor : ITenantResolveContributor, ITransientDependency
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private static int DEFAULT_TENANT = 3;

        public DefaultTenantResolveContributor(IHttpContextAccessor httpContextAccessor)
        {
            _httpContextAccessor = httpContextAccessor;
        }

        public int? ResolveTenantId()
        {
            return DEFAULT_TENANT;
        }
    }

It is added in PreInitialize in Core module

Configuration.MultiTenancy.Resolvers.Add<DefaultTenantResolveContributor>();

When application runs, it fails to load it. With exception:

Castle.MicroKernel.ComponentNotFoundException HResult=0x80131500 Message=No component for supporting the service DefaultTenantResolveContributor was found Source=Castle.Windsor StackTrace: at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy) at Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver, Type type) at Abp.MultiTenancy.TenantResolver.GetTenantIdFromContributors() at Abp.MultiTenancy.TenantResolver.ResolveTenantId() at Abp.Runtime.Session.ClaimsAbpSession.get_TenantId() at Abp.Domain.Uow.UnitOfWorkBase.SetFilters(List1 filterOverrides) at Abp.Domain.Uow.UnitOfWorkBase.Begin(UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkManager.Begin(UnitOfWorkOptions options) at MyProject.Migrations.Seed.SeedHelper.WithDbContext[TDbContext](IIocResolver iocResolver, Action1 contextAction) in C:\Dev\MyProject\Base\aspnet-core\src\MyProject.EntityFrameworkCore\Migrations\Seed\SeedHelper.cs:line 38 at MyProject.Migrations.Seed.SeedHelper.SeedHostDb(IIocResolver iocResolver) in C:\Dev\MyProject\Base\aspnet-core\src\MyProject.EntityFrameworkCore\Migrations\Seed\SeedHelper.cs:line 18 at MyProject.EntityFrameworkCore.MyProjectEntityFrameworkCoreModule.PostInitialize() in C:\Dev\MyProject\Base\aspnet-core\src\MyProject.EntityFrameworkCore\EntityFrameworkCore\MyProjectEntityFrameworkCoreModule.cs:line 51 at System.Collections.Generic.List1.ForEach(Action1 action) at Abp.AbpBootstrapper.Initialize()

Please help what I am missing as I followed the doc at <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy">https://aspnetboilerplate.com/Pages/Doc ... ti-Tenancy</a>

Thank you.

VS 2017 has built in support for npm and webpack and angular cli. It would be nice if you can provide steps how to update AngurlarUI project so it can be compiled, run and debugged right from Visual Studio.

Anyone have tried to that? I understand I can keep doing cli. It would nice to use VS debugger.

Thanks.

Problem: If you enable two factor, it will use cache to store codes it generates. Issue: If you have multiserver environment, it would not find the code on the other servers. Not a good solution: One can configure Redis for caching, but there is no way to specify for cache just to use redis for that cache! Better solution: Cache in database, it would be nice if mongodb database was supported for caching.

Any other ideas?

We are looking for the experience developers to take asp.net zero template and apply it our project needs. This would be ongoing project with ongoing features and enhancements. If you are interested please let us know at this link <a class="postlink" href="https://goo.gl/forms/T9Jk164OidI1itcN2">https://goo.gl/forms/T9Jk164OidI1itcN2</a>

Just getting up and running on ASP.NET zero.

I would like my instance to use IdentityServer4 and MongoDB.

The features pages of asp.net zero lists IdentityServer4 integration, please point how to configure the use on MongoDB.

Thanks.

Showing 41 to 50 of 50 entries