Base solution for your next web application

Activities of "byteplatz"

Thank you very much. It worked like a charm.

I did the following:

  • Main App upgraded to 1.6 (clean install - localization db working)
  • Custom Module in separate solution containing default projects (core, app, web, entityframework)
  • Custom Module Web Core Project CoreModule with:
public override void PreInitialize()
        {
            //Add/remove localization sources
            Configuration.Localization.Sources.Add(
                new DictionaryBasedLocalizationSource(
                    MyModuleConsts.LocalizationSourceName,
                    new XmlEmbeddedFileLocalizationDictionaryProvider(
                        Assembly.GetExecutingAssembly(),
                        MyModuleConsts.LocalizationSourceRootNameSpace
                        )
                    )
                );
        }

And the localization is working out of the box...

For another module (separated solution as well, I didnt have to change anything)

Well done !!!

Amazing job on these smooth upgrades!

Regards

Bruno Bertechini

Great. I was going pretty much the same thought.

I will try something like that in near future.

Bruno Bertechini

Hello,

We are using aspnetzero to develop a distributed system based on SOA, DDD and CQRS principles together with NServiceBus ([http://www.particular.net])).

We are using the approach of separated module for each SOA Service.

We have a main app (aspnet zero code with few customizations). We have a service module (based on [https://github.com/aspnetboilerplate/sample-blog-module])).

Each service is meant to be autonomous and the separated sample blog module seems to be a perfect fit for that.

Next step for us is to come up with a solid approach for configuring permissions. We already have a separated module adding permissions (and they are appearing fine in main app).

We are using the default tenant as the 'Test' tenant for internal use and test of features before they are released to customers.

The question here is : What is the best approach to add service module permissions (from separated solution) to default tenant roles ?

I mean, we dont have the Context from main app inside the sercie module (and we dont find it right indeed).

Ideas/Recommendations ?

Cheers

Bruno Bertechini

The first idea that came up was create a shared interface for example ICreatePermissionsForDefaultTenant and use main app DefaultTenantRoleAndUserCreator seed to execute the code from several modules.

The same apply for menus created by the separated module...And I thinkg other things will benefit for the given approach as well. Thus, main app does not know about the service module but still can add permissions, menus and such into the database.

Bruno

Thanks Halil,

I will implemente like that !

Regards

Bruno

Hello there,

We have a separated module from main app and we are trying to create a feature to enable/disable this module.

I am coding this inside the separated solution (my custom module) :

I have created a feature provider and set features like this:

context.Create(
                MyCustomModule.MyFirstFeature,
                defaultValue: "false",
                displayName: L("MyCustomModule"),
                scope: FeatureScopes.All,
                inputType: new CheckboxInputType()
            );

And added this line to MyCustomModuleCoreModule.cs:

Configuration.Features.Providers.Add<MyCustomModuleFeatureProvider>();

I can check in main app logs that this code is being called (I have couple debug logs), but the feature is not showing in tenant or edition selections.

Do I need to do anything else to make the features show up in the menus for tenant and edition selection ?

Cheers

Bruno

After changing the AppFeatureProvider from main app and build/run with F5 the feature from my custom module showed up.

Weird behavior that I am getting sometimes with other things as well: Sometimes when I reload while debugging (F5) my custom module dlls are not loaded or code inside it is not added to main app...

Maybe this is a problem with assembly scanning ?

Bruno

Hello Halil,

I am studying the Abp.Samples.Blog solution and I can see that you have created specific classes for authorization and authentication (BlogTenant, BlogUser ...).

Is that a required or recommended approach ?

What are the odds regarding sharing the MainApp.Core Project as nuget packages and install it to Samples.Blog.Core ? Do you see any problems or considerations ?

I Would love to know the caveats under each implementation!

Cheers

Bruno Bertechini

Hello,

After moving to the next step of my separated solution with custom module, I have created the unitofwork/crud operation of a very basic entity. New DataModule created tests running ok.

I have updated the nuget package from main app, and when I log in I get this exception

System.NotSupportedException: The specified LINQ expression contains references to queries that are associated with different contexts.

The exception is being raised at :

var loginResult = await _userManager.LoginAsync(usernameOrEmailAddress, password, tenancyName);

from AccountController:

private async Task<AbpUserManager<Tenant, Role, User>.AbpLoginResult> GetLoginResultAsync(string usernameOrEmailAddress, string password, string tenancyName)
        {
            var loginResult = await _userManager.LoginAsync(usernameOrEmailAddress, password, tenancyName);

            switch (loginResult.Result)
            {
                case AbpLoginResultType.Success:
                    return loginResult;
                default:
                    throw CreateExceptionForFailedLoginAttempt(loginResult.Result, usernameOrEmailAddress, tenancyName);
            }
        }

I have folowed Sample.Blog and changed to v1.6 accordingly

Any ideas ?

It looks like the DI is injecting the Custom Module DbContext into AccountController (UserManager) and trying to mix them up...

Bruno

I think its related to upgrade to 0.7.4.1 (the sample blog module is using 0.6.4.1).

The constructors for AbpUserManager has changed and now include IUnitOfWorkManager

Maybe something related to it.

May I ask you to update the blog sample using latest versions so I can make sure its working OOB before customizing it ?

Please, Im stuck on this

Bruno

Showing 11 to 20 of 57 entries