Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "doubledp"

I have tried to determine what I am doing wrong, but can't seem to find the difference between my controller/app service combo and the dashboard example.

I am getting the following JavaScript error when calling the method inside my service from the angular controller:

TypeError: Object doesn't support property or method 'success'

When I use the following, I get no JavaScript error:

function Test() {
     appService.getTest()
        .then(function(result) {
            var test = result;
         });
}

But when I use the following code, I get the JavaScript error:

function Test() {
     appService.getTest()
        .success(function(result) {
            var test = result;
         });
}

What could be the reason for this?

Hi,

I am not sure if this has been done yet. How is the user notified when his/her account has been activated by the system admin?

Hi,

I have setup IIS's authentication by enabling Windows Authentication and disabling Anonymous Authentication. When browsing the site I get presented with the following error message:

The request filtering module is configured to deny a request where the query string is too long

Here is the generated URL upon login:

http://localhost:80/Account/Login?ReturnUrl=%2FAccount%2FLogin%3FReturnUrl%3D%252FAccount%252FLogin%253FReturnUrl%253D%25252FAccount%25252FLogin%25253FReturnUrl%25253D%2525252FAccount%2525252FLogin%2525253FReturnUrl%2525253D%252525252FAccount%252525252FLogin%252525253FReturnUrl%252525253D%25252525252FAccount%25252525252FLogin%25252525253FReturnUrl%25252525253D%2525252525252FAccount%2525252525252FLogin%2525252525253FReturnUrl%2525252525253D%252525252525252FAccount%252525252525252FLogin%252525252525253FReturnUrl%252525252525253D%25252525252525252FAccount%25252525252525252FLogin%25252525252525253FReturnUrl%25252525252525253D%2525252525252525252FAccount%2525252525252525252FLogin%2525252525252525253FReturnUrl%2525252525252525253D%252525252525252525252FAccount%252525252525252525252FLogin%252525252525252525253FReturnUrl%252525252525252525253D%25252525252525252525252FAccount%25252525252525252525252FLogin%25252525252525252525253FReturnUrl%25252525252525252525253D%2525252525252525252525252FAccount%2525252525252525252525252FLogin%2525252525252525252525253FReturnUrl%2525252525252525252525253D%252525252525252525252525252FAccount%252525252525252525252525252FLogin%252525252525252525252525253FReturnUrl%252525252525252525252525253D%25252525252525252525252525252FAccount%25252525252525252525252525252FLogin%25252525252525252525252525253FReturnUrl%25252525252525252525252525253D%2525252525252525252525252525252FAccount%2525252525252525252525252525252FLogin%2525252525252525252525252525253FReturnUrl%2525252525252525252525252525253D%252525252525252525252525252525252FAccount%252525252525252525252525252525252FLogin%252525252525252525252525252525253FReturnUrl%252525252525252525252525252525253D%25252525252525252525252525252525252FAccount%25252525252525252525252525252525252FLogin%25252525252525252525252525252525253FReturnUrl%25252525252525252525252525252525253D%2525252525252525252525252525252525252FAccount%2525252525252525252525252525252525252FLogin%2525252525252525252525252525252525253FReturnUrl%2525252525252525252525252525252525253D%252525252525252525252525252525252525252FAccount%252525252525252525252525252525252525252FLogin%252525252525252525252525252525252525253FReturnUrl%252525252525252525252525252525252525253D%25252525252525252525252525252525252525252F

How do I fix this?

Hi,

The Maintenance section under Administration is only available to the Host from what I understand in the documentation. In order for me to use LDAP, I had to disable multi tenancy, but now I it seems I am unable to access the Host.

How do you get access to the Host side of the web app when you have disabled multi tenancy?

Your help is greatly appreciated.

Question

Hi,

Is there any guide or could you provide a guide to how one would deploy the web application?

I'm assuming that this would be done via the Publish action within Visual Studio using the Web Deploy method. I would really like a guide on best practice, recommended setup of IIS, deployment of web app, web api service and migration of database, pit falls and tips; if possible.

Any help will be greatly appreciated!

Hi,

Could you please help me with the following:

I am trying to execute async calls is parallel and only use execute subsequent code after all the async tasks have been completed.

Here is the code:

public async Task<LabourSalesHighlightsDto> GetLabourSalesHighlights(LabourSalesAggregateInput input)
        {
            LabourSalesHighlightsDto labourSalesHighlights = new LabourSalesHighlightsDto();

            var labourSalesOperatorAggregateTask = GetLabourSalesAggregation_ByCompanyNumber_ByOperatorName(input);
            var labourSalesInvoicingAggregateTask = GetLabourSalesAggregation_ByCompanyNumber_ByInvoicing(input);
            var labourSalesCreditingAggregateTask = GetLabourSalesAggregation_ByCompanyNumber_ByCredits(input);

            await Task.WhenAll(labourSalesOperatorAggregateTask, labourSalesInvoicingAggregateTask, labourSalesCreditingAggregateTask);

            var labourSalesOperatorAggregate = labourSalesOperatorAggregateTask.Result;
            var labourSalesInvoicingAggregate = labourSalesInvoicingAggregateTask.Result;
            var labourSalesCreditingAggregate = labourSalesCreditingAggregateTask.Result;

            labourSalesHighlights.SalesTopTotal = labourSalesOperatorAggregate.Items.Select(lsa => lsa.Value).FirstOrDefault();
            labourSalesHighlights.SalesTopName = labourSalesOperatorAggregate.Items.Select(lsa => lsa.Label).FirstOrDefault();
            labourSalesHighlights.SalesTopDescription = labourSalesOperatorAggregate.Items.Select(lsa => lsa.CompanyName).FirstOrDefault();

            labourSalesHighlights.InvoicingTotal = labourSalesInvoicingAggregate.Items.Select(lsa => lsa.Value).Sum();
            labourSalesHighlights.InvoicingBestName = labourSalesInvoicingAggregate.Items.Select(lsa => lsa.Label).FirstOrDefault();
            labourSalesHighlights.InvoicingWorstName = labourSalesInvoicingAggregate.Items.Select(lsa => lsa.Label).LastOrDefault();

            labourSalesHighlights.CreditingTotal = labourSalesCreditingAggregate.Items.Select(lsa => lsa.Value).Sum();
            labourSalesHighlights.CreditingBestName = labourSalesCreditingAggregate.Items.Select(lsa => lsa.Label).FirstOrDefault();
            labourSalesHighlights.CreditingWorstName = labourSalesCreditingAggregate.Items.Select(lsa => lsa.Label).LastOrDefault();

            return labourSalesHighlights;
        }

When I don't inherit from AppServiceBase for this particular service, the code is working with the only exception that the audit log entry does not get created then.

When I inherit from AppServiceBase for this particular service, the execution of the above method results in an exception as per below:

System.NotSupportedException: A second operation started on this context before a previous asynchronous operation completed. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context. Any instance members are not guaranteed to be thread safe.

I want to inherit from AppServiceBase so that my method call gets logged to the Audit Log table.

Please help!

Hi,

It seems like I might have broken something during the upgrade. I went from version 1.5.0.0 to 1.7.0.0 (Quite a painful exercise I might add).

The problem I am experiencing now is that sidebar navigation does not expand when clicking on it. I have inspected the element that should contain items and the rendered HTML does contain those items, but the expansion does not happen.

Any ideas what the problem might be?

Hi,

In the documentation regarding the Dynamic Web API layer, there is the mention of the following:

ITaskAppService is the application service that we want to wrap with an api controller. It is not restricted to application services but this is the traditional and recommended way. "tasksystem/task" is name of the api controller with an arbitrary namespace. You should define at least one-level namespace but you can define more deep namespaces like "myCompany/myApplication/myNamespace1/myNamespace2/myServiceName". '/api/services/' is a prefix for all dynamic web api controllers. So, address of the api controller will be like '/api/services/tasksystem/task' and GetTasks method's address will be '/api/services/tasksystem/task/getTasks'. Method names are converted to camelCase since it's conventional in javascript world.

Does that mean we should explicitly define every application service like the following, if we want it generate the APIs according to the namespace of where the interface is defined?

DynamicApiControllerBuilder.For<ITaskAppService>("/myNamespace1/myNamespace2/tasksystem/task").Build();

Or is there perhaps a more dynamic way of generating it as above? The reason I am asking is because I see that currently in the template's WebAPI assembly, the initialization is defined as follows:

DynamicApiControllerBuilder
                .ForAll<IApplicationService>(typeof(TemplateApplicationModule).Assembly, "app")
                .Build();

Hi,

I would like to know if it is possible for dependency injection to work in the ApplicationService, if one would implement generics within the custom repository?

Something like this...

Custom repository interface:

public interface ICustomRepository<TEntity> : IRepository<TEntity, int>, ITransientDependency
        where TEntity : class, IEntity<int>
    {
        List<TEntity> GetRepositoryList();
    }

Custom repository:

public class CustomRepository<TEntity> : ApplicationRepositoryBase<TEntity>, ICustomRepository<TEntity>
        where TEntity : class, IEntity<int>
    {
        public CustomRepository(IDbContextProvider<ApplicationDbContext> dbContextProvider)
            : base(dbContextProvider)
        {

        }

        public List<TEntity> GetRepositoryList()
        {

        }
    }
}

Custom application service:

public class CustomAppService : CaerusAppServiceBase, ICustomAppService
    {
        private readonly ICustomRepository<CustomEntity> _customEntityRepository;
        
        public CustomAppService (ICustomRepository<CustomEntity> customEntityRepository)
        {
            _customEntityRepository = customEntityRepository;
        }
}
Question

Hi,

When calling GetCurrentUser defined within ApplicationServiceBase from my application service that inherits from my ApplicationServiceBase it fails as all AbpSession properties is null.

appService.user is set correctly in the client side code within the AngularJS controller.

Need help urgently please!

Showing 1 to 10 of 15 entries