Base solution for your next web application

Activities of "pkouame"

Ok - just wanted to know if this was tested before. I'll package up the logs and open an issue in the repo with the results. Thanks.

I have and I can forward all the logs (there are more). Pretty much followed this for troubleshooting. My question is whether you have tried to do so in my context before.

Yes - there is the obious 502.5 HHTP errror recorded in logs - no real help though. The application doesn't even start. Before I post the traces, I want to know whether any of you on the development team attempted a (successful) aspnet-core deployment from VS Code with the Azure Web App Extension on macOS.

I know the macOS platform is still not the priority so If this is a known issue, I would be willing to help debug and document a successful workflow for the community.

Has anyone successfully deployed an aspnet-core solution to an Azure web app from VS Code macOS with the Azure extension?

I am strictly on VS Code macOS for over a year with this angular/aspnet-core solution. Deploying the angular component (to Azure) is as easy as FTPing the zipped dist folder, but the core side does not deploy well from VS Code with the official Azure extension. No matter what I try, it deploys the published project but the server side stalls with an ugly 502.5 HTTP Error instead of the lovely swagger UI. My solution has been to publish from Visual Studio (Enterprise in Windows) - pretty smooth there...

Just thought I would ask before delving into the gory details. I have lived through all of the angular/aspnet-core macOS growing pains and would like to totally eliminate Windows from my workflow.

By the way, my web app setup is pretty vanilla standard as descibed in the Step-by-Step here

Hi - I'm getting a repository disabled message from github. (for all private zero repositories)

Just a heads up.

Spiramira

No problem man! I realize you need a much larger team to test all the combinations and platforms you support, so I'm more than happy to contribute as a subscriber and follower. Hopefully you can grow into that :D !

Ultimately my goal is to sweeten our development options with a pure macOS .net development option and ms + your platform affords that now. I am finding that a VS Code (with tons of extensions) + DataGrid dev environment is turning out to be a bang up substitute to windoz (and some of our developers are running it in VM so doubly painful). Tons faster and overall much more enjoyable...

MySql was just a temporary stop to build a local sandbox environment. Will be switching to sqlserver Azure for most of our work. But I hope this helps some out there.

I have started to record some of my findings in github. Leave it up to you decide if and when to merge.

Do you entertain push requests?

Regards, P (<a href="mailto:[email protected]">[email protected]</a>)

Ouch!
I will have the same issue soon and installing VS2017 on the server is NOT an option since we're on Azure App and not dedicated VMs. Please keep us posted if you can. Will do the same.

Regards, P

Yes, language/unicode support is slightly off somewhere for MySql. I think some MySql db configuration is required since it doesn't support unicode by default.

In the meantime, and as a dirty shortcut, I converted all the unicode strings in GetInitialLanguages() with some brute force encoding to ascii. Not pretty for the moment, I know. But the seeding completes (albeit some weird characters in my non-english language table rows). But the API HOST is UP!

After tweaking some host and client urls on both front and back end, the ANGULAR CLIENT is UP!

NOTE: I had to change the ng server parameter to --live-reload-client [url] since the old style is not supported anymore.

So , after some hair pulling, I confirm that this bleeding edge configuration:

aspnet core + Angular2 + netcoreapi1.1

  • latest dotnetsdk
  • latest npm,
  • latest node(current not LTS)
  • latest ng
  • latest MySQL (see supported package stack below)

solution is up on macOS Sierra 10.2.2!

Plus all development on latest VS Code. Sweet. Much better experience than win10 vs2017 since I'm on a VM there. So much faster...

Hope this helps someone.

PS: would still like your opinion on some the issues I am discovering

P

Of course.

Setting the Migrator aside for the moment, I got a full MySQL migration and database update working using cli dotnet with this stack only:

<PackageReference Include="MySqlConnector" Version="*" />

    <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="1.1.1-*" />
    <PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.1-*" />

I get a full set of MySQL migrations, design and snapshot that create the base db just fine. It looks like this stack is more lenient with TPH model configuration conventions. I tried many combinations including the latest from MySql, Sapient and others. But most are VERY sensitive to Abp's TPH inheritance model and choke on discriminators (something to do with EntityFrameworkCore's RelationalModelValidator). I believe the convention for EF core is to provide values for all non-abstract entities in the mapped hierarchy. Since Abp's base types are not abstract (meant to be instantiated - right? ), then hey must have a discriminator value provided. So I got around that with configuring them in dbContext's OnCreate explicitly:

modelBuilder.Entity<FeatureSetting>(b =>
            {
                b.HasDiscriminator<string>("Discriminator")
                    .HasValue<FeatureSetting>(nameof(FeatureSetting))
                    .HasValue<EditionFeatureSetting>(nameof(EditionFeatureSetting))
                    .HasValue<TenantFeatureSetting>(nameof(TenantFeatureSetting));
            });

            modelBuilder.Entity<PermissionSetting>(b =>
            {
                b.HasDiscriminator<string>("Discriminator")
                    .HasValue<PermissionSetting>(nameof(PermissionSetting))
                    .HasValue<RolePermissionSetting>(nameof(RolePermissionSetting))
                    .HasValue<UserPermissionSetting>(nameof(UserPermissionSetting));
            });

That's one issue. I want to try the other more conventional package stacks and dataproviders, but would like your opinion on the TPH model configuration and why it passes muster with SqlServer (haven't tested that myself yet on Mac). Also I run into netcoreapi 1.1 incompatibilities with some.

But at least I've got a database and I'm on to Seeding now :-)

Next up : I get a DbUpdateException when seeding tries to update a DisplayName column:

System.Exception: A DbUpdateException was caught while saving changes.  ---> Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> MySql.Data.MySqlClient.MySqlException: Incorrect string value: '\xD8\xA7\xD9\x84\xD8\xB9...' for column 'DisplayName' at row 1

Could this be some sort of language or culture (pun intended :-) ) issue? I've overiden my DbContext's SaveChange() to capture a little more from the exception, but would be helpful if I could pinpoint more on the exact table and column its attempting to update. I am still on my Pomelo stack.

Thanks in advance. Hope this additional testing helps those of you on macOS. It looks promising.

P

Here is the full log of the Migrator dotnet run

EBUG 2017-04-27 15:08:51,727 [1    ] Abp.Modules.AbpModuleManager             - Loading Abp modules...
DEBUG 2017-04-27 15:08:51,764 [1    ] Abp.Modules.AbpModuleManager             - Found 10 ABP modules in total.
DEBUG 2017-04-27 15:08:52,120 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: ZeroCoreAngularCore.Migrator.ZeroCoreAngularCoreMigratorModule, ZeroCoreAngularCore.Migrator, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,124 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: ZeroCoreAngularCore.EntityFrameworkCore.ZeroCoreAngularCoreEntityFrameworkCoreModule, ZeroCoreAngularCore.EntityFrameworkCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,124 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Zero.EntityFrameworkCore.AbpZeroCoreEntityFrameworkCoreModule, Abp.ZeroCore.EntityFrameworkCore, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,124 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.ZeroCore, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,125 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.Zero.AbpZeroCommonModule, Abp.Zero.Common, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,125 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.AbpKernelModule, Abp, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,128 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule, Abp.EntityFrameworkCore, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,128 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: ZeroCoreAngularCore.ZeroCoreAngularCoreCoreModule, ZeroCoreAngularCore.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,129 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,129 [1    ] Abp.Modules.AbpModuleManager             - Loaded module: Abp.MailKit.AbpMailKitModule, Abp.MailKit, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,134 [1    ] Abp.Modules.AbpModuleManager             - 10 modules loaded.
DEBUG 2017-04-27 15:08:52,496 [1    ] ameworkCore.AbpEntityFrameworkCoreModule - Registering DbContext: ZeroCoreAngularCore.EntityFrameworkCore.ZeroCoreAngularCoreDbContext, ZeroCoreAngularCore.EntityFrameworkCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null
DEBUG 2017-04-27 15:08:52,985 [1    ] Abp.Localization.LocalizationManager     - Initializing 3 localization sources.
DEBUG 2017-04-27 15:08:53,045 [1    ] Abp.Localization.LocalizationManager     - Initialized localization source: Abp
DEBUG 2017-04-27 15:08:53,058 [1    ] Abp.Localization.LocalizationManager     - Initialized localization source: AbpZero
DEBUG 2017-04-27 15:08:53,087 [1    ] Abp.Localization.LocalizationManager     - Initialized localization source: ZeroCoreAngularCore
DEBUG 2017-04-27 15:08:53,161 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - Found 1 classes define auto mapping attributes
DEBUG 2017-04-27 15:08:53,161 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - ZeroCoreAngularCore.Friendships.Cache.FriendCacheItem
INFO  2017-04-27 15:08:54,633 [1    ] ZeroCoreAngularCore.Migrator.Log         - Host database: server=127.0.0.1;userid=root;pwd=Me;port=3306;database=ZeroCoreAngularCoreDb;sslmode=none;
INFO  2017-04-27 15:08:54,633 [1    ] ZeroCoreAngularCore.Migrator.Log         - Continue to migration for this host database and all tenants..? (Y/N): 
INFO  2017-04-27 15:08:58,704 [1    ] ZeroCoreAngularCore.Migrator.Log         - HOST database migration started...
INFO  2017-04-27 15:08:59,782 [1    ] ZeroCoreAngularCore.Migrator.Log         - An error occured during migration of host database:
INFO  2017-04-27 15:08:59,812 [1    ] ZeroCoreAngularCore.Migrator.Log         - System.InvalidOperationException: The entity type 'EditionFeatureSetting' is part of a hierarchy, but does not have a discriminator property configured.
   at Microsoft.EntityFrameworkCore.Internal.ModelValidator.ShowError(String message)
   at Microsoft.EntityFrameworkCore.Internal.RelationalModelValidator.ValidateDiscriminator(IEntityType entityType)
   at Microsoft.EntityFrameworkCore.Internal.RelationalModelValidator.ValidateDiscriminatorValues(IEntityType rootEntityType)
   at Microsoft.EntityFrameworkCore.Internal.RelationalModelValidator.ValidateInheritanceMapping(IModel model)
   at Microsoft.EntityFrameworkCore.Internal.RelationalModelValidator.Validate(IModel model)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
   at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass16_0.&lt;RealizeService&gt;b__0(ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServiceCollectionExtensions.&lt;&gt;c.&lt;AddEntityFramework&gt;b__0_13(IServiceProvider p)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass16_0.&lt;RealizeService&gt;b__0(ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.Infrastructure.RelationalServiceCollectionExtensions.&lt;&gt;c.&lt;AddRelational&gt;b__0_8(IServiceProvider p)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass16_0.&lt;RealizeService&gt;b__0(ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.Infrastructure.AccessorExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.Migrate(DatabaseFacade databaseFacade)
   at Abp.Zero.EntityFrameworkCore.AbpZeroDbMigrator`1.CreateOrMigrate(AbpTenantBase tenant, Action`1 seedAction)
   at ZeroCoreAngularCore.Migrator.MultiTenantMigrateExecuter.Run(Boolean skipConnVerification) in /Users/me/Dev/zero/ZeroCoreAngularCore/aspnet-core/src/ZeroCoreAngularCore.Migrator/MultiTenantMigrateExecuter.cs:line 62
INFO  2017-04-27 15:08:59,812 [1    ] ZeroCoreAngularCore.Migrator.Log         - Canceled migrations.
DEBUG 2017-04-27 15:09:02,009 [1    ] Abp.Modules.AbpModuleManager             - Shutting down has been started
DEBUG 2017-04-27 15:09:02,009 [1    ] Abp.Modules.AbpModuleManager             - Shutting down completed.
Showing 11 to 20 of 33 entries