Base solution for your next web application

Activities of "cangunaydin"

Question

Hi, In Module Zero when you append the bundles and implement it in the layout or in the header layout, it doesn't bundle it. It shows all the scripts in seperate files.

For ex: i have a bundle called ~/Bundles/App/libs/js when i include this bundle in layout.cshtml like this @Scripts.Render("~/Bundles/App/libs/js") it doesn't do the job and i get bunch of script files seperately instead of the bundle do i miss sth here? or do we need some configuration to activate the bundling?

Question

Hi, I have a problem with exception handling sometimes i need to disable javascript error exception handling. For ex. I send some ajax request to another server and i don't have any control on return values so in the return json there is no "success" property. As a result it displays me modal which has error. How i can disable this? Any solution for that?

Hello, I have a problem with the lists when it is scrollable. When i click the actions button in the bottom of the list it doesn't show the content tab in the right place. You can see the details in the attachment.

How can i fix this? Any workaround for this problem?

Question

Hello, I want to apply a new custom settings to asp.net core & angular2 application. This will be a json object value all over the application. But i want to change it from appsettings file. My problem is i tried to add this value to appsettings.json file and I can reach the value from mvc application from IHostingEnvironment interface in startup and can reach the whole config file. But how can i reach these values from applicationservice project. I have tried couple of things like SettingManager and ISettingStore but these are custom values that is parsed to a different object from the config file i guess. Can you suggest some solution for it or should i parse this value in AppSettingProvider?

Hello, I have found couple of things in the angular2 ui project. I have just wanted to share it. Inside change-profile-picture-modal.component.html 2 things i realized. First one is saving variable which do not exist in the component.ts and the second thing is hide() function probably it should be close() function.

Hello, I have a problem with dependency injection in angular2 project. I have created couple of services in my application project all the appservice classes is implemented from i applicationservice interface and i can see that my methods are working from swagger ui i can do posts or gets to my methods. In the UI project i have run refresh.bat inside nswag folder and it regenerated the methods for me now i can see the components when i import the '@shared/service-proxies/service-proxies' but when i inject them to the constructor of any component. It is giving me an error on runtime. 'No provider for GroupServiceProxy! ; Zone: angular ; Task: Promise.then ; Value:', it feels like it can not inject the http service inside service-proxies but i don't know why. Here is the detailed example below.

GroupAppService:

[AbpAuthorize(AppPermissions.Pages_Tenant_Groups)]
    public class GroupAppService : MagicInfoConfigAppServiceBase, IGroupAppService
    {
        private readonly IRepository<Group> _groupRepository;
        private readonly IAppFolders _appFolders;
        public GroupAppService(IAppFolders appFolders, IRepository<Group> groupRepository)
        {
            _appFolders = appFolders;
            _groupRepository = groupRepository;
        }
        [AbpAuthorize(AppPermissions.Pages_Tenant_Groups_Create)]
        public async Task CreateGroup(CreateGroupInput input)
        {
            var group = input.MapTo<Group>();
            await _groupRepository.InsertAndGetIdAsync(group);
        }

        public async Task<PagedResultDto<GroupListDto>> GetGroups(GetGroupInput input)
        {

            var query = _groupRepository
              .GetAll().Include(g => g.Address)
              .WhereIf(
                  !input.Filter.IsNullOrEmpty(),
                  p => p.Name.Contains(input.Filter) ||
                          p.ServerUrl.Contains(input.Filter) ||
                          p.Address.Name.Contains(input.Filter)
              );
            var groupCount = await query.CountAsync();
            var groups = await query
                .OrderBy(input.Sorting)
                .PageBy(input)
                .ToListAsync();

            var groupListDtos = groups.MapTo<List<GroupListDto>>();

            return new PagedResultDto<GroupListDto>(
                 groupCount,
                 groupListDtos
                 );
        }

        [AbpAuthorize(AppPermissions.Pages_Tenant_Groups_Delete)]
        public async Task DeleteGroup(EntityDto input)
        {
            await _groupRepository.DeleteAsync(input.Id);
        }

      


    }

IGroupAppService:

public interface IGroupAppService : IApplicationService
    {
        Task<PagedResultDto<GroupListDto>> GetGroups(GetGroupInput input);
        Task CreateGroup(CreateGroupInput input);

        Task DeleteGroup(EntityDto input);

    }

and the last thing angular2 component coming as default with asp.net zero. I am trying to inject the groupService inside. Dashboard.component.ts:

import { Component, Injector, AfterViewInit } from '@angular/core';
import { TenantDashboardServiceProxy,GroupServiceProxy } from '@shared/service-proxies/service-proxies';
import { AppComponentBase } from '@shared/common/app-component-base';
import { appModuleAnimation } from '@shared/animations/routerTransition';

@Component({
    templateUrl: './dashboard.component.html',
    animations: [appModuleAnimation()]
})
export class DashboardComponent extends AppComponentBase implements AfterViewInit {

    constructor(
        injector: Injector,
        private _dashboardService: TenantDashboardServiceProxy,
        private _groupService:GroupServiceProxy
    ) {
        super(injector);
    }

    ngAfterViewInit(): void {
        
        Morris.Area({
            element: 'sales_statistics',
            padding: 0,
            behaveLikeLine: false,
            gridEnabled: false,
            //gridLineColor: false,
            axes: false,
            fillOpacity: 1,
            data: [
                {
                    period: '2011 Q1',
                    sales: 1400,
                    profit: 400
                }, {
                    period: '2011 Q2',
                    sales: 1100,
                    profit: 600
                }, {
                    period: '2011 Q3',
                    sales: 1600,
                    profit: 500
                }, {
                    period: '2011 Q4',
                    sales: 1200,
                    profit: 400
                }, {
                    period: '2012 Q1',
                    sales: 1550,
                    profit: 800
                }
            ],
            lineColors: ['#399a8c', '#92e9dc'],
            xkey: 'period',
            ykeys: ['sales', 'profit'],
            labels: ['Sales', 'Profit'],
            pointSize: 0,
            lineWidth: 0,
            hideHover: 'auto',
            resize: true
        });

        this.getMemberActivity();
    }
    test():void{
        this._groupService.deleteGroup(1).subscribe(result=>{
                alert("subscribed");
        });
    }
    getMemberActivity(): void {
        this._dashboardService
            .getMemberActivity()
            .subscribe(result => {
                $("#totalMembersChart").sparkline(result.totalMembers, {
                    type: 'bar',
                    width: '100',
                    barWidth: 6,
                    height: '45',
                    barColor: '#F36A5B',
                    negBarColor: '#e02222',
                    chartRangeMin: 0
                });

                $("#newMembersChart").sparkline(result.newMembers, {
                    type: 'bar',
                    width: '100',
                    barWidth: 6,
                    height: '45',
                    barColor: '#5C9BD1',
                    negBarColor: '#e02222',
                    chartRangeMin: 0
                });
            });
    };
}

Hello, I am just curious how the ui states in angularjs application can render .cshtml files, partial views? Are there any extension for that? Because as i know it needs to go to the server side to render the html isn't it so?

Question

Hello, I am using Asp.Net Zero Core and Angular2 project. When i built it first time it connects to signalr and there is no problem with the connection. But after rebuilds for both ui and .net core end, sometimes it doesn't connect to signalr hub and gives an 500 internal error for the link <a class="postlink" href="http://localhost:22742/signalr/hubs?=1485624235544">http://localhost:22742/signalr/hubs?=1485624235544</a> from the console of the web browser.

I use VS Code for the ui and VS 2015 for the .net core project. Do you have any idea about what can be the problem?

Question

Hello, I am using Angular 2 with .Net Core Project. After a long time, in the server side i am getting this error.

ERROR 2017-02-05 12:18:16,574 [4    ] Mvc.ExceptionHandling.AbpExceptionFilter - Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at ByteBrick.MagicInfoConfig.Friendships.Cache.UserFriendsCache.GetCacheItem(UserIdentifier userIdentifier) in D:\dev\vs\dotnetcore\MagicInfoConfig\Server\src\ByteBrick.MagicInfoConfig.Core\Friendships\Cache\UserFriendsCache.cs:line 44
   at Castle.Proxies.Invocations.UserFriendsCache_GetCacheItem.InvokeMethodOnTarget()
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options)
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at Castle.Proxies.UserFriendsCacheProxy.GetCacheItem(UserIdentifier userIdentifier)
   at ByteBrick.MagicInfoConfig.Chat.ChatAppService.GetUserChatFriendsWithSettings() in D:\dev\vs\dotnetcore\MagicInfoConfig\Server\src\ByteBrick.MagicInfoConfig.Application\Chat\ChatAppService.cs:line 41
   at lambda_method(Closure , Object , Object[] )
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext()

Is it because my session is ended after a while? cause userIdentifier object is posted to the server side from the client as null value.

Hello, I have migrated my project to the new version. But there is a problem with the bootstrap-select ddls. You can not select anything when they are on. I have tried it without doing any modifications to the project it is also the same in the brand new downloaded project. To see the problem.

1- run the project. 2- go to the roles from the administration section. 3- try to filter it by permissions from the combobox.

Showing 1 to 10 of 50 entries