<cite>alirizaadiyahsi: </cite> Hi @abdourahmani,
Did you see /ProjectName.Host/App_Data/Logs.txt? Is there any error message?
Here is the only message I found witch can be seen as an error message.
WARN 2017-10-09 14:54:48,920 [4 ] Mvc.ExceptionHandling.AbpExceptionFilter - Login failed! Abp.UI.UserFriendlyException: Login failed! at Lbi.RapproDab.Web.Controllers.TokenAuthController.<GetLoginResultAsync>d__32.MoveNext() in D:\MyWorkingDir\Lbi.RapproDab v4.5.1\aspnet-core\src\Lbi.RapproDab.Web.Core\Controllers\TokenAuthController.cs:line 511 --- 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 Lbi.RapproDab.Web.Controllers.TokenAuthController.
<cite>ismcagdas: </cite> Hi @abdourahmani,
Can you share your app service method's full code ? AspNet Zero already contains entities with different PK than integer and there is no problem with that. Maybe you have another problem.
Thanks.
Hi ! Here it is :
using System.Linq;
using Abp.Domain.Repositories;
using Abp.EntityFrameworkCore.Repositories;
using Lbi.RapproDab.AppBusiness;
using Lbi.RapproDab.AppEntities;
using Microsoft.EntityFrameworkCore;
namespace Lbi.RapproDab.AppService.Rappro
{
public class RapproAppService : RapproDabAppServiceBase, IRapproAppService
{
private readonly IRepository<Agence> _branchRepository;
private readonly IRepository<AtmTerminal> _atmRepository;
private readonly IReconciliationManager _rapproManager;
private readonly IRepository<AtmTransaction, long> _atmTransRepository;
private readonly IRepository<Acquereur, long> _acqRepository;
private readonly IRepository<Emetteur, long> _emtRepository;
private readonly IRepository<CaisseAtm, long> _caiTransRepository;
private readonly IRepository<ReconciledTrans, long> _recTransRepository;
public RapproAppService(IReconciliationManager rapproManager,
IRepository<AtmTerminal> atmRepository, IRepository<Agence> branchRepository,
IRepository<AtmTransaction, long> atmTransRepository, IRepository<CaisseAtm, long> caiseRepository,
IRepository<ReconciledTrans, long> recTransRepository, IRepository<Emetteur, long> emtRepository,
IRepository<Acquereur, long> acqRepository)
{
_rapproManager = rapproManager;
_atmTransRepository = atmTransRepository;
_caiTransRepository = caiseRepository;
_atmRepository = atmRepository;
_branchRepository = branchRepository;
_recTransRepository = recTransRepository;
_emtRepository = emtRepository;
_acqRepository = acqRepository;
}
public void ReconcileAll(bool initDb = true)
{
var branches = _branchRepository
.GetAll()
.Include(p => p.AtmTerminals);
foreach (var agc in branches)
{
ReconcileBranch(agc.BranchCode, initDb);
initDb = false;
}
}
public void ReconcileBranch(string branchCode, bool initDb = true)
{
var atms = _atmRepository.GetAll()
.Include(p => p.BranchId)
.Where(a => a.BranchId.BranchCode == branchCode)
.ToList();
foreach (var atm in atms)
{
ReconcileAtm(branchCode, atm.AtmCode, initDb);
initDb = false;
}
}
public void ReconcileAtm(string branchCode, string terminalId, bool initDb = true)
{
var atmTrans = _atmTransRepository.GetAll()
.Where(a => a.TerminalId.Equals(terminalId));
var caiTrans = _caiTransRepository.GetAll()
.Where(a => a.CaTermId.Equals(terminalId)).ToList();
var recData = _rapproManager.CustomerTrans(atmTrans, caiTrans);
var emtTrans = _emtRepository.GetAll().Where(a => a.CaTermId == terminalId);
recData = _rapproManager.EmetteurTrans(recData, emtTrans);
var acqTrans = _acqRepository.GetAll().Where(a => a.CaTermId == terminalId);
recData = _rapproManager.AcquereurTrans(recData, acqTrans);
recData = _rapproManager.CancelledTrans(recData);
var db = _recTransRepository.GetDbContext();
if (initDb)
{
const string sql = "Delete from ReconciledTrans;";
db.Database.ExecuteSqlCommand(sql);
}
db.AddRange(recData);
db.SaveChanges();
}
}
}
Regards.
Just to add than I'm using the latest Asp.net core (v4.5.1) with angular
Hi, inspired by this post [https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=9847]) I solved the problem by adding "System.ComponentModel.TypeConverter" from nugget in all the projects.
Abdourahmani
Hi !
Plaease run the web.host project at least once before running web.public.
Abdourahmani
<cite>ismcagdas: </cite> Hi @abdourahmani,
So, is there any records on AbpLanguages table when you browse it with sql server management studio or with a similar tool ?
Thanks.
It's Ok now. I was running the "public" application. When I switched to the "Host", everything work fine.
Thanks
<cite>ismcagdas: </cite> Hi @abdourahmani,
So, is there any records on AbpLanguages table when you browse it with sql server management studio or with a similar tool ?
Thanks.
No, the table AbpLanguages is empty.
<cite>ismcagdas: </cite> Hi @abdourahmani,
Do you use Sql Server ?
Thanks.
Yes, I'm using Sql Server.
Hi ,
I'm also facing this issue. with aspnet Core + angular 4 (not combined solution) v4.2.1
Abdourahmani