As I said, I have not changed anything except updating the ABP Nuget from 3.0.0 to 3.6.1 and also updated the other nugets to the latest version.
Now I have two solutions, One with ASPNetZero 4.5 having ABP 3.0.0 and Other with ASPNetZero still 4.5 but ABP 3.6.1 (Because I only updated the ABP nugets.)
And the reason to upgrade the ABP nuget is, I want to implement SignalR which is only supported on ABP >=3.6.0
In the old solution its running absolutely fine, but in the new it is throwing error.... I am really stuck..... Please help....
Hi,
I did not understand you completely. Exactly in which file I need to add the missing mapping. Also When In old version (ABP 3.0) it is working, why after updating the ABP nuget to 3.6.1 it stopped working....
Regards, Mahendra
Hi,
Till the time we were on ABP version 3.0.0, everything was fine. Recently we upgraded all the Nugets of ABP from 3.0.0 to 3.6.0 and today again updated all the ABP Nugets to 3.6.1 along with the associated nugets to the latest version..
Now in the SessionAppService.cs class, I am getting the AutoMapper Error in the code written inside the If block.
if (AbpSession.TenantId.HasValue) {
output.Tenant = ObjectMapper
.Map<TenantLoginInfoDto>(await TenantManager
.Tenants
.Include(t => t.Edition)
.FirstAsync(t => t.Id == AbpSession.GetTenantId()));
}
I am getting following error. Please help me to resolve this error....
Mapping types: Tenant -> TenantLoginInfoDto CitiXsys.iVend365.MultiTenancy.Tenant -> CitiXsys.iVend365.Sessions.Dto.TenantLoginInfoDto
Type Map configuration: Tenant -> TenantLoginInfoDto CitiXsys.iVend365.MultiTenancy.Tenant -> CitiXsys.iVend365.Sessions.Dto.TenantLoginInfoDto
Property: Edition AutoMapper.AutoMapperMappingException: Error mapping types.
Mapping types: Tenant -> TenantLoginInfoDto CitiXsys.iVend365.MultiTenancy.Tenant -> CitiXsys.iVend365.Sessions.Dto.TenantLoginInfoDto
Type Map configuration: Tenant -> TenantLoginInfoDto CitiXsys.iVend365.MultiTenancy.Tenant -> CitiXsys.iVend365.Sessions.Dto.TenantLoginInfoDto
Edition -> EditionInfoDto (Destination member list) Abp.Application.Editions.Edition -> CitiXsys.iVend365.Sessions.Dto.EditionInfoDto (Destination member list)
Unmapped properties: TrialDayCount MonthlyPrice AnnualPrice IsHighestEdition IsFree
at AutoMapper.ConfigurationValidator.AssertConfigurationIsValid(IEnumerable1 typeMaps) at lambda_method(Closure , Tenant , TenantLoginInfoDto , ResolutionContext ) --- End of inner exception stack trace --- at lambda_method(Closure , Tenant , TenantLoginInfoDto , ResolutionContext ) at lambda_method(Closure , Object , Object , ResolutionContext ) at AutoMapper.Mapper.AutoMapper.IMapper.Map[TDestination](Object source) at CitiXsys.iVend365.Sessions.SessionAppService.<GetCurrentLoginInformations>d__0.MoveNext() in D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Application\Sessions\SessionAppService.cs:line 42 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__5
1.MoveNext() in D:\Github\aspnetboilerplate\src\Abp\Threading\InternalAsyncHelper.cs:line 120
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at CitiXsys.iVend365.Web.Session.PerRequestSessionCache.<GetCurrentLoginInformationsAsync>d__3.MoveNext() in D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Core\Session\PerRequestSessionCache.cs:line 33 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
at CitiXsys.iVend365.Web.Views.Shared.Components.TenantChange.TenantChangeViewComponent.<InvokeAsync>d__2.MoveNext() in D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Mvc\Views\Shared\Components\TenantChange\TenantChangeViewComponent.cs:line 18
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.<InvokeAsyncCore>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.<InvokeAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.<InvokeCoreAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at AspNetCore._Views_Account__Layout_cshtml.__Generated__TenantChangeViewComponentTagHelper.
Hello,
We find out the reason, why it was not saving. Actually, before this unit of work, one more unit of work was used and due to some reason the outer unit of work was not getting complete, hence inner one also fails.
Regards, Mahendra
Hi, I am trying to delete 4 records, followed by insert 4 records. Both operations are happening inside UnitOfWork. See Code below. using (var unitOfWork = UnitOfWorkManager.Begin()) {
//Delete existing settings
_AddOnSettingRepository.DeleteAsync(p => p.PropertyName == "OAuthToken");
_AddOnSettingRepository.DeleteAsync(p => p.PropertyName == "OAuthTokenSecret");
_AddOnSettingRepository.DeleteAsync(p => p.PropertyName == "OAuthExpiresIn");
_AddOnSettingRepository.DeleteAsync(p => p.PropertyName == "OAuthExpiresAt");
//Insert new settings
AddXeroIntegrationSetting("OAuthToken", oauth_token);
AddXeroIntegrationSetting("OAuthTokenSecret", oauth_token_secret);
AddXeroIntegrationSetting("OAuthExpiresIn", oauth_expires_in);
AddXeroIntegrationSetting("OAuthExpiresAt", oauth_expires_at.ToString());
unitOfWork.Complete();
}
But, its not committing into the database. Could you please advise, what is wrong here?
Regards, Mahendra
That, I am already doing. Question is if user manually type in the URL in which he does not have the permission, then instead of sending the user to the login page I want to show him the page with the message "You don't have permission'. How can I achieve this?
Regards, Mahendra
Hi,
I have added, AbpAuthorize attribute as follows on my ProductGroup Controller class. [AbpAuthorize(AppPermissions.Pages_Products_ProductGroup)]
Now when a user who do not have permission on ProductGroup, type in the URL of <a class="postlink" href="http://localhost:62114/Mpa/ProductGroup">http://localhost:62114/Mpa/ProductGroup</a>, then instead of throwing the error page of UnAuthorized Access (i.e. Error403.cshtml), it throws him to the login page.
Could you please advise what am I doing wrong. I want the user to show the Unauthorized Page (i.e. Error403.cshtml). How can I achieve this?
Regards, Mahendra
How can I get all the permission for a user on which the permission has been granted.
<cite>aaron: </cite> Yes, just follow the documentation for SignalR AspNetCore Integration.
Hi aaron,
I just downloaded the latest version of ASPNetZero (i.e. 5.1) and install the signalR package. After installing the package, it compiles successfully....
But The same is not happening with ASPNetZero version 4.1....Can you please re-confirm, if signalR is compatible to ASPNetZero Version 4.1
Regards, Mahendra
Hi,
I tried whatever you suggested, but I found nowhere Castle.Core version 4.0.0 refereed. When I search the Castle.Core in solution I also did not find the version 4.0.0. Please see the attached screen shot. But I am still getting this error (Once I install the nuget package for signalR)
Assembly 'Abp.AspNetCore' with identity 'Abp.AspNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Castle.Core, Version=4.1.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' which has a higher version than referenced assembly 'Castle.Core' with identity 'Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'
Please advice... Regards, Mahendra