Base solution for your next web application

Activities of "eggersa"

Question

When I try to run the ASP.NET Zero Solution (download was in the end of last week) I get the following error:

Castle.Windsor Warning: 0 : Exception when resolving optional dependency Dependency 'FeatureValueStore' type 'Abp.Application.Features.IFeatureValueStore' on component Abp.Application.Features.FeatureChecker., Castle.MicroKernel.CircularDependencyException: Dependency cycle has been detected when trying to resolve component 'MyProject.Authorization.Users.UserManager'.
The resolution tree that resulted in the cycle is the following:
Component 'MyProject.Authorization.Users.UserManager' resolved as dependency of
	component 'MyProject.MultiTenancy.Demo.TenantDemoDataBuilder' resolved as dependency of
	component 'MyProject.MultiTenancy.TenantManager' resolved as dependency of
	component 'MyProject.Editions.FeatureValueStore' resolved as dependency of
	component 'Abp.Application.Features.FeatureChecker' resolved as dependency of
	component 'Abp.Application.Features.FeatureDependencyContext' resolved as dependency of
	component 'MyProject.Authorization.Users.UserManager' resolved as dependency of
	component 'MyProject.Authorization.PermissionChecker' resolved as dependency of
	component 'MyProject.Web.Controllers.HomeController' which is the root component being resolved.

So far I didn't change anything in the code. Except some workarounds for .NET 4.6 features since I am using Visual Studio 2013 with .NET 4.5.2. But I do not think, that this has anything to do with the dependency resolution problem. Looking forward to fix this problem.

When can the fix be expected? Since we are using the paid version as base for a real world customer project, which is already ongoing, I would be happy about a fix.

To me, the validation of DTOs seems like magic. Now, I was wondering how exactly the automatic validation of DTOs works behind the scenes?

Do you try to get the user infomation within a mvc controller or a service? Because both, the AbpServiceBase and the AbpController base class provide you with a property named CurrentSession that gives you access to the current user.

The default behavior of a form within a ASP.NET Zero template is to disable the submit button until the form is valid. Since I have a rather large form with multiple tabs I enable the button always as its difficult for the user to figure out why the button might be disabled. Instead, I handle the error event of the service proxy and if there are any validation errors I explicitly highlight the tabs with invalid form data.

vm.save = function () {
                vm.saving = true;
                customerService.createOrUpdateCustomer(vm.customer).success(function () {
                    $uibModalInstance.close();
                }).error(function (error) {
                    if (error.validationErrors && error.validationErrors.length > 0) {
                        // hightlight tabs with invalid form controls...
                    }
                }).finally(function () {
                    vm.saving = false;
                });
            };

Unfortunately I would like to disable the default behavior of a service error in this case. By default, the templates behavior is to show a SweetAlert popup with the error message. How can I override this behavior for this special case?

For my application project, I need to consume some of the services that are provided by the Bing Map API (web services). So far, I wasn't able to find the right place in the ASP.NET Zero Solution to put those service calls in a way, that is unit test compatible. Also, those bing map services are not meant to be directly invoked by the presentation layer.

First I though of the application service layer. But that seems wrong since the application service layer is meant to be directly accessed by the presentation layer.

Then I checked the domain service layer which is only accessible by the application service layer, but not by the presentation layer. But to me, the domain service layer seems more, like its name already suggests, domain related whereas the bing map is not within the domain.

Now I am looking for an answer where one would put this bing map api calls within the ASP.NET Zero solution? The class that wraps those calls should be unit testable and registered to the dependency injection system.

Found it myself:

Create a new folder in the <MyProjectName>.Core Project e.g. GeoMapService and then create the appropriate IGeoMapService interface within that folder and a concrete implementation BingGeoMapService.

Within the app.js are the route configurations like this:

$stateProvider.state('tenant.settings', {
                url: '/settings',
                templateUrl: '~/App/tenant/views/settings/index.cshtml',
                menu: 'Administration.Settings.Tenant'
            });

There is this "menu" property which does not seem to be an official property at all. See $stateProvider API. From the ASP.NET Zero Getting Started tutorial, all I know is that this property has something to do with the highlighting of the currently active menu in the navbar. Since in my case this highlighting mechanism is somewhat buggy I would like to know where this menu property gets processed / handled to further investigate my issues.

Hello ismcagdas

Thank you for your answer.

Since I am not using the Layout 4, but Layout 3 I cannot describe the steps. However, with your answer I will be able to investigate the problem myself ;).

Unfortunately, the documentation for the DTOs does not say much about the IOutputDto interface. Only that the interface should be implemented by "output DTOs". So, whats the technical reason to implement that interface?

Showing 1 to 10 of 35 entries