Base solution for your next web application

Activities of "rferrari"

Hi

any item I click of the user menu (Top Right Corner) I get this error:

js?v=Z1h2uULy0vbPsE8-aqccnlRnUTa8VDu14Ehcx-OgGss1:58431 TypeError: $uibModal.open is not a function
    at Object.vm.changePassword (js?v=CaapLNZiW7gGNH2xfY5LQqYYZ4hzi7bIzn4vUhFnR9o1:2946)
    at fn (eval at compile (js?v=Z1h2uULy0vbPsE8-aqccnlRnUTa8VDu14Ehcx-OgGss1:58545), <anonymous>:4:264)
    at b (js?v=Z1h2uULy0vbPsE8-aqccnlRnUTa8VDu14Ehcx-OgGss1:58440)
    at e (js?v=Z1h2uULy0vbPsE8-aqccnlRnUTa8VDu14Ehcx-OgGss1:58588)
    at m.$eval (js?v=Z1h2uULy0vbPsE8-aqccnlRnUTa8VDu14Ehcx-OgGss1:58459)
    at m.$apply (js?v=Z1h2uULy0vbPsE8-aqccnlRnUTa8VDu14Ehcx-OgGss1:58459)
    at HTMLAnchorElement.<anonymous> (js?v=Z1h2uULy0vbPsE8-aqccnlRnUTa8VDu14Ehcx-OgGss1:58588)
    at HTMLAnchorElement.dispatch (js?v=Z1h2uULy0vbPsE8-aqccnlRnUTa8VDu14Ehcx-OgGss1:11)
    at HTMLAnchorElement.r.handle (js?v=Z1h2uULy0vbPsE8-aqccnlRnUTa8VDu14Ehcx-OgGss1:11)

Can you help? Thanks

Hi,

when I try to log as another user I get the error Impersonation Token Invalid.

Any hint?

Thanks

Hi,

I followed the indications to remove the front end application provided in this post:

[http://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=5058&hilit=front+end])

That is:

You need to delete HomeController, AboutController and TenantRegistrationController under Controllers folder of MVC project. You also need to remove their *.cshtml files as well.

You also need to change your default route to Account/Login page.

That said the application is correctly rerouting to the login page. My question is if there is a way to reroute to the current angular state and not been logged out.

I am using ASP.NET MVC 5.x & Angularjs 1.x last version.

Thanks

Hi,

in my project in spite the fact that self registration is disabled in the tenant setting, CREATE ACCOUNT and EMAIL ACTIVATION links are still present in login form.

Could you advise?

Thanks

Hi,

I downloaded the last template of AbpZero and upgraded the abp packages but I get the following error

Error	CS7036	There is no argument given that corresponds to the required formal parameter 'multiTenancy' of 'ClaimsAbpSession.ClaimsAbpSession(IPrincipalAccessor, IMultiTenancyConfig, ITenantResolver, IAmbientScopeProvider<SessionOverride>)'

Can you advise?

Thanks

Hi,

I was working well with ABP 9.6. When 9.7 came out I upgraded the libraries and I could not login into the application. So I downgraded to 9.6, reinstalling the correct version of all the other packages. Now at every build I cannot login and I have to close Visual Studio and open again.

I find the following in the log:

WARN  2016-07-05 09:04:35,230 [12   ] Abp.Logging.LogHelper                    - Abp.Authorization.AbpAuthorizationException: Current user did not login to the application!
   at Abp.Authorization.AuthorizeAttributeHelper.<AuthorizeAsync>d__13.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizeAttributeHelper.cs:line 29
--- 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 Nito.AsyncEx.AsyncContext.<>c__DisplayClass3.<Run>b__1(Task t)
   at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- 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 Nito.AsyncEx.AsyncContext.Run(Func`1 action)
   at Abp.Authorization.AuthorizeAttributeHelper.Authorize(IEnumerable`1 authorizeAttributes) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizeAttributeHelper.cs:line 45
   at Abp.Authorization.AuthorizeAttributeHelper.Authorize(IAbpAuthorizeAttribute authorizeAttribute) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizeAttributeHelper.cs:line 50
   at Abp.Web.Mvc.Authorization.AbpMvcAuthorizeAttribute.AuthorizeCore(HttpContextBase httpContext) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Mvc\Web\Mvc\Authorization\AbpMvcAuthorizeAttribute.cs:line 41
Abp.Authorization.AbpAuthorizationException: Current user did not login to the application!
   at Abp.Authorization.AuthorizeAttributeHelper.<AuthorizeAsync>d__13.MoveNext() in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizeAttributeHelper.cs:line 29
--- 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 Nito.AsyncEx.AsyncContext.<>c__DisplayClass3.<Run>b__1(Task t)
   at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- 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 Nito.AsyncEx.AsyncContext.Run(Func`1 action)
   at Abp.Authorization.AuthorizeAttributeHelper.Authorize(IEnumerable`1 authorizeAttributes) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizeAttributeHelper.cs:line 45
   at Abp.Authorization.AuthorizeAttributeHelper.Authorize(IAbpAuthorizeAttribute authorizeAttribute) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Authorization\AuthorizeAttributeHelper.cs:line 50
   at Abp.Web.Mvc.Authorization.AbpMvcAuthorizeAttribute.AuthorizeCore(HttpContextBase httpContext) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Mvc\Web\Mvc\Authorization\AbpMvcAuthorizeAttribute.cs:line 41

Can you give me a way out?

Thanks

Hi,

I am trying to make multiple addition to a collection at the same time, but it is failing.

Situation is:

The client send a partner (main entity) with phones (or other elements) as a collection. There are 3 cases, the phone has been deleted and it is in a deleted phones list, the phone has been modified or added. I identify the new phones because they have a 0 id so I build the following application service:

[AbpAuthorize(AppPermissions.Pages_Tenant_Partners_CreatePartner)]
        public async Task EditPartner(EditPartnerInput input)
        {
            var partner = input.MapTo<Partner>();
            var phones = input.Phones.MapTo<List<Phone>>();
            var phonesToDelete = input.DeletedPhones.MapTo<List<Phone>>();

            var query = await _partnerRepository.UpdateAsync(partner);

            foreach (var phone in phones)
            {
                if (phone.Id == 0)
                {
                    {
                        var currentPartner = _partnerRepository.Get(partner.Id);
                        currentPartner.Phones.Add(phone);
                      //  await CurrentUnitOfWork.SaveChangesAsync();
                    }
                }
                else
                {
                    var phoneToUpdate = await _phoneRepository.GetAsync(phone.Id);
                    phone.MapTo(phoneToUpdate);
                    await _phoneRepository.UpdateAsync(phoneToUpdate);
                }
            }
            foreach (var phoneToDelete in phonesToDelete)
            {
                await _phoneRepository.DeleteAsync(phoneToDelete.Id);
            }
        }

Everything is working fine:

  1. Multiple deleted phones in the client are deleted in the DB
  2. Multiple edited phones in the client are updated in the DB
  3. If the phone to add is just one it is added

BUT

if I have more than one phone to add I get the following error:

System.InvalidOperationException: Attaching an entity of type 'stake.Partners.Phone' failed because another entity of the same type already has the same primary key value. This can happen when using the 'Attach' method or setting the state of an entity to 'Unchanged' or 'Modified' if any entities in the graph have conflicting key values. This may be because some entities are new and have not yet received database-generated key values. In this case use the 'Add' method or the 'Added' entity state to track the graph and then set the state of non-new entities to 'Unchanged' or 'Modified' as appropriate.

This is obviously related to the fact that the first record is not yet saved when the second one is processed. The suggestion is to use Add, and I am using it!

What I tried:

  1. Used Insert, of course it did not work;
  2. Used Add and CurrentUnitOfWork.SaveChangesAsync(), it is the same;

It seems I should change the state of the item, but I did not find the way.

Please help, thanks!

Hi,

I have multiple tables with values I want to make appear in dropdown menus in the client during creation or update of entities. Typical case is phonetype for phones. Practically, I should not send anything from the client, just retrieve the complete list of items. I was thinking to use GetAll() or GetAllList() or GetAllListAsync(), but there is no way. I have to give an input and the input it is not to be null.

Can you help me? This is a requirement I have for a lot of items.

Thanks

Showing 1 to 8 of 8 entries