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

Activities of "OriAssurant"

I have a kendoui grid in .Web project and App/ folder as index.cshtml

From index.js when I attempt to make a call to the web api. (Web API which was automatically created by ASP Net Zero after implementing DI)

The service is called CartService and below is the method I am trying to access:

    public PagedResultDto<ShoppingCartListDto> GetCartData()
    {
  }

The error I am getting is :

{"message":"An error has occurred.","exceptionMessage":"There is an action GetCartData defined for api controller app/shoppingCartService but with a different HTTP Verb. Request verb is GET. It should be Post","exceptionType":"System.Web.HttpException","stackTrace":" at Abp.WebApi.Controllers.Dynamic.Selectors.AbpApiControllerActionSelector.GetActionDescriptorByActionName(HttpControllerContext controllerContext, DynamicApiControllerInfo controllerInfo, String actionName)\r\n at Abp.WebApi.Controllers.Dynamic.Selectors.AbpApiControllerActionSelector.SelectAction(HttpControllerContext controllerContext)\r\n at System.Web.Http.ApiController.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken)\r\n at Castle.Proxies.DynamicApiController1Proxy_3.ExecuteAsync_callback(HttpControllerContext controllerContext, CancellationToken cancellationToken)\r\n at Castle.Proxies.Invocations.ApiController_ExecuteAsync_3.InvokeMethodOnTarget()\r\n at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n at Abp.WebApi.Controllers.Dynamic.Interceptors.AbpDynamicApiControllerInterceptor1.Intercept(IInvocation invocation)\r\n at Castle.DynamicProxy.AbstractInvocation.Proceed()\r\n at Castle.Proxies.DynamicApiController`1Proxy_3.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.

I understand that the problem here is to specify the method as GET. But, how do I do that in ASP NET Zero class?

We want to show a ASPNetZero theme based popup to the user to get confirmation before deleting a particular record from the grid.

Could someone please help in pointing me to an example for the same?

I have added the files i need for routing within the same Dashboard tab. Also attached 1 App_Start- > Navigation -> PageNames.cs where i added the permissions. Also added same permissions in the database for those pages added.

Please review it and let me would i be able to implement wizard like functionality within the same tab .. Would appreciate any help from you. App.zip

Answer

Thank you.

I see ISoftDelete is being implement in the below fashion at AbpDbContext: protected override void OnModelCreating(DbModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Filter(AbpDataFilters.SoftDelete, (ISoftDelete d) => d.IsDeleted, false); modelBuilder.Filter(AbpDataFilters.MustHaveTenant, (IMustHaveTenant t, int tenantId) => t.TenantId == tenantId || (int?) t.TenantId == null, 0); //While "(int?)t.TenantId == null" seems wrong, it's needed. See <a class="postlink" href="https://github.com/jcachat/EntityFramework.DynamicFilters/issues/62#issuecomment-208198058">https://github.com/jcachat/EntityFramew ... -208198058</a> modelBuilder.Filter(AbpDataFilters.MayHaveTenant, (IMayHaveTenant t, int? tenantId) => t.TenantId == tenantId, 0); }

However, if I create a new interface like IHasOraginzationUnit, how can I restrict it to just one entity/table in my Project's DbContext?

  • I also came across AbpUserStore in the meanwhile. Is there any way I can leverage this feature to achieve my task?

somehow its does not show any error on console ..

It shows the url on the left bottom of the page when I hover on the details button but when I click on it ..it does not redirect to that page

Hi,

When we were using the SPA (MVC & jQuery) we had access to a WebAPI Controller.

When we migrated (mostly everything) to SPA solution, everything works and builds, except now we can't hit the custom controller we built in the WebAPI proj.

This is the error from hitting the Controller w/valid input: {"message":"An error has occurred."}

Here is what it looks like, more or less:

public class nameOfController : MajesticApiControllerBase
    {
        public nameOfController()
        {
        }

        [HttpGet, ActionName("CheckIfSIM")]
        public IHttpActionResult nameOfController(string value)
        {
        }
}

I also want to mention that it vanished from Swagger.

Thanks for the help.

Hi, Not able to route between cshtml pages within the same Dashboard Tab both having same permissions. I tried to put an url for my page in the app.js as well with same permission and Also added a value in the Navigations- PageName class. But its not working

if (abp.auth.hasPermission('Pages.Tenant.Dashboard')) { $urlRouterProvider.otherwise("/tenant/dashboard"); //Entrance page for a tenant $stateProvider.state('tenant.dashboard', { url: '/dashboard', templateUrl: '~/App/tenant/views/dashboard/index.cshtml' }); }

    if (abp.auth.hasPermission('Pages.Tenant.Dashboard')) {
     $urlRouterProvider.otherwise("/tenant/isvalidsim"); //Entrance page for a tenant
       $stateProvider.state('tenant.isvalidsim', {
         url: '/isvalimsim',
       templateUrl: '~/App/tenant/views/dashboard/isvalidsim.cshtml'
           
       });
    }

This is going to be similar to a partial page ajax rendering . Can you please send me a sample code i can look at ? Also is there a reason why you are using angularjs version 1.6.6 and not angular version 4 and above on the mvc-angularjs project.

I am trying to implement my own AbpUser and AbpUserBase classes instead of using one of the Abp's. I am creating the same classes(AbpUser ,AbpUserBase ) in my application as I need to customize it as per my requirement for User.cs class which implements AbpUser<User>.

But I came across this issue across multiple classes that passes <User> like for example:

public class RoleManager : AbpRoleManager<Role, User>
    {
        public RoleManager(
            RoleStore store,
            IPermissionManager permissionManager,
            IRoleManagementConfig roleManagementConfig,
            ICacheManager cacheManager,
            IUnitOfWorkManager unitOfWorkManager)
            : base(
                store,
                permissionManager,
                roleManagementConfig,
                cacheManager,
                unitOfWorkManager)
        {

        }
    }

I am getting errors like

The type 'Project.project.Authorisations.Users.User' cannot be used as a Type parameter 'TUser' in the generic type or method AbpRoleManager<Role, User>. There is no implicit reference conversion from 'Project.project.Authorisations.Users.User' to 'Abp.Authorisation.Users.AbpUser<Project.project.Authorisations.Users.User>'.

How to resolve this issue?

Answer

So in using OU's, how would we prevent cross OU members from seeing each other's data? You're not suggesting modifying every controller output's LINQ statement, are you?

Answer

Can you point me to the documentation about "UserGroups"? I only see Org. Units...

Showing 131 to 140 of 152 entries