Base solution for your next web application

Activities of "behiunforgiven"

Is it Possible to have dynamic Permissions?

thank you for reply I read the document but I can't understand one thing:

I want to have a dynamic Navigation system with dynamic accessing rules. How can I implement this by Abp+Zero ?

I get this error when run the project and I can not trace it

Input string was not in a correct format!

this is stack trace

[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +12099621
   System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt) +133
   System.Convert.ToInt64(String value) +51
   Abp.Runtime.Session.AbpSession.get_UserId() +89
   Abp.Authorization.<AuthorizeAsync>d__0.MoveNext() +60
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   Nito.AsyncEx.<>c__DisplayClass3.<Run>b__1(Task t) +56
   System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() +52
   System.Threading.Tasks.Task.Execute() +47
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   Nito.AsyncEx.AsyncContext.Run(Func`1 action) +201
   Abp.Authorization.AuthorizeAttributeHelper.Authorize(IEnumerable`1 authorizeAttributes) +71
   Abp.Authorization.AuthorizeAttributeHelper.Authorize(IAbpAuthorizeAttribute authorizeAttribute) +43
   Abp.Web.Mvc.Authorization.AbpMvcAuthorizeAttribute.AuthorizeCore(HttpContextBase httpContext) +85
   System.Web.Mvc.AuthorizeAttribute.OnAuthorization(AuthorizationContext filterContext) +160
   System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor) +97
   System.Web.Mvc.Async.&lt;&gt;c__DisplayClass21.&lt;BeginInvokeAction&gt;b__19(AsyncCallback asyncCallback, Object asyncState) +743
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +14
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
   System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +343
   System.Web.Mvc.Controller.&lt;BeginExecuteCore&gt;b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +25
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
   System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +465
   System.Web.Mvc.Controller.&lt;BeginExecute&gt;b__14(AsyncCallback asyncCallback, Object callbackState, Controller controller) +18
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +20
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
   System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +374
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +16
   System.Web.Mvc.MvcHandler.&lt;BeginProcessRequest&gt;b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +52
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +384
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +103
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

What's wrong with AbpSession UserId ? How Can I Solve the problem?

Clearing cookies solve my problem but what causes this?

how to prevent it?

Question

How Can I Create a DTO from these classes :

public class RegisterRequest : Entity
    {
        public int? UnitId { get; set; }
       .
       .
       .
       .
       public virtual Unit Unit { get; set; }
    }

and

public class Unit : Entity
    {
        public Unit()
        {
            RegisterRequests = new HashSet<RegisterRequest>();
        }
       public string UnitName { get; set; }
       .
       .
       .
       public virtual ICollection<RegisterRequest> RegisterRequests { get; set; }
    }

that contains whole "RegisterRequest" class and "UnitName" of "Unit" class.

thank you

Thanx for your answer but, No, it doesn't work

I Can add "UnitName" to My DTO by and fill it by a foreach loop.

But I want to use AutoMapper.

Did you try $rootScope ?

I use this code to solve this:

Mapper.CreateMap<RegisterRequest, RegisterRequestOutDto>()
                .ForMember(dest => dest.UnitName, opt =>
                    opt.MapFrom(src => src.Unit.UnitName))
Question

I Create a new class and derived from "XAppServiceBase", but when I want to use "UserManager" in that class, it is null !

public class GeneralAppService : IAUAppServiceBase
    {
        public string GetStateName(long userId)
        {
            //I want to use UserManage Here but it's null !
        }
    }

After updating to ABP v0.7.7.1 I have an error in my Application Service I found that when I inject

private readonly ITotalAppService _totalAppService;

error occurs.

it had no errors before.

Showing 21 to 30 of 33 entries