Trying to port an old web site to ABP and i'm getting an error while trying to execute the addQuoteService I started from the Zero template.
Error: [object Object]
Abp error : Error :
Abp Log: None
Doesn't reach Elmah, Doesn't reach NLog.
code :
vm.add = function () {
vm.saving = true;
addQuoteService.execute(vm.newQuote).then(
function (response) {
$location.path('quote-list');
},
function (errorResponse) {
vm.saving = false;
});
vm.newQuote = {
sapProjectNo: '1',
description: 'project'
}
my service is injected and is in Type=allAngular....
What's wrong ?
I try to seed Data in my Tenant, User, Role from the InitialDataBuilder and i get this error
Can not set TenantId to a different value than the current filter parameter value or IAbpSession.TenantId while MayHaveTenant filter is enabled!
It should not be active because i did all as usual....
In Core Module Configuration.MultiTenancy.IsEnabled = false;
in Seed context.DisableAllFilters(); new InitialDataBuilder(context).Build();
I dont know how to fix it when i already did the normal thing to remove the filters. Can someone help me plz.
i dont want to need to hack the framework to put a Session in Seeder...
hey,
I'm trying to integrate Elmah, Elmah MVC, Elmah Contrib WebApi.
My probleme is coming from MVC part, it register my error and it register an other from ABP but the WebApi part work perfectly.
Does someone know how to fix this ? Here is the error :
The model item passed into the dictionary is of type 'System.Web.Mvc.HandleErrorInfo', but this dictionary requires a model item of type 'Abp.Web.Mvc.Models.ErrorViewModel'.
The stack trace :
System.InvalidOperationException: The model item passed into the dictionary is of type 'System.Web.Mvc.HandleErrorInfo', but this dictionary requires a model item of type 'Abp.Web.Mvc.Models.ErrorViewModel'.
at System.Web.Mvc.ViewDataDictionary`1.SetModel(Object value)
at System.Web.Mvc.ViewDataDictionary..ctor(ViewDataDictionary dictionary)
at System.Web.Mvc.WebViewPage`1.SetViewData(ViewDataDictionary viewData)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
thx in advance :)
EDIT: Just to tell, my error is handled correctly by Elmah MVC but i feel that i shouldn't receive an other error in the same time ;) that tell me that i require an Abp.Web.Mvc.Models.ErrorViewModel or tell me if i can switch this somewhere in the application! :)
Hello,
I'm trying to implement the ResetPassword feature trough MVC controller for the user and i'm not sure to know how is it made with the UserManager.
i tried to get a ResetToken but i get the error: No IUserTokenProvider is registered.
_userManager.GeneratePasswordResetTokenAsync(user.Id);
Is there something implemented in ABP or should i check trough Identity ?
thx
Hello,
I'm currently doing my Login action in MVC but i wan't to switch this to the Application Layer. My problem is HttpContext is not accessible in the Application Layer!
Anyone know a way to do it with the Application Layer?
thx in advance!
I updated my project to the latest ABP Version and now nothing is working....
Can not set TenantId to a different value from the current filter parameter value while MayHaveTenant filter is enabled!
How do i remove this filter from ALL the application...?
ISSUE RELATED : <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/476">https://github.com/aspnetboilerplate/as ... issues/476</a>
Doc: <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Data-Filters">http://aspnetboilerplate.com/Pages/Docu ... ta-Filters</a>
The documentation doesn't tell us how to remove forever the IMayHaveTenant filter.... that is pretty useless for almost everyone that doesn't require Tenant part of the framework...
Please do more documentation on Breaking Change release...
Hey,
I got an SSL certificate, so now I can go to my website with HTTPS and HTTP, but how can I force the use of HTTPS?
thx in advance!
I'm trying to secure my ApplicationService now,
i checked ModuleZeroSample and tried to do the same but something must be wrong in my code... but i doesn't find the problem :(
When i try to go in a protected route... i have a Popup that say "No user logged in!" with an ok button ? when we click ok it reload the same page.... so there is the infinite loop ?!
What am i doing wrong ?
I did the same for my ParticipantList and this one work i have the same exact code for the client and still the client doesnt work at all.... And my ParticipantList doesnt send his RequestURL to the Login page... so when the user is connecting he doesn't get redirected to the page he was trying to get.
I know it work on sample of Zero Module but i dont know what i'm doing wrong ..!
Thx for the help in advance :)
Application Service
[AbpAuthorize]
public class GetClientListService : ApplicationService, IGetClientListService
AuthorizationProvider
public class SurveyAuthorizationProvider : AuthorizationProvider
{
public override void SetPermissions(IPermissionDefinitionContext context)
{
// No Need for special permission at the moment, just to be connected
}
}
ApplicationModule
[DependsOn(typeof(SurveyCoreModule))]
public class SurveyApplicationModule : AbpModule
{
public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
Configuration.Authorization.Providers.Add<SurveyAuthorizationProvider>();
Configuration.Settings.Providers.Add<SurveySettingProvider>();
}
}
Startup class in WebProject
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
}
}
AccountController
[HttpPost]
public async Task<JsonResult> Login(LoginViewModel loginModel, string returnUrl = "")
{
// ... login validation ....
if (string.IsNullOrWhiteSpace(returnUrl))
{
returnUrl = Request.ApplicationPath;
}
return Json(new MvcAjaxResponse { TargetUrl = returnUrl });
}
Hi,
I'm trying to make a list of my entity and it seem's that i cannot get the entities where the IsDeleted = true
_repoNews.GetAll().Where(x => x.IsDeleted == true).ToList().Count always return 0 but i have at least 1 entity that is Deleted.
Is there a way to get the IsDeleted = true ?
I found that ISoftDelete say ->
/// <summary> /// Used to standardize soft deleting entities. /// Soft-delete entities are not actually deleted, /// marked as IsDeleted = true in the database, /// but can not be retrieved to the application. /// /// </summary>
Is there a way to deactive this for a request?
The thing i wanna make is a list where I see all my entity and see if they are active / inactive (!deleted or deleted) and i want to be able to reactive an entity IsDeleted = true to IsDeleted = false
hey,
i'm trying to put my initial data in Seed method and the creatorId from IFullAudited nevver get filled with my data.... And I dont understand why my context is getting 0 user from the context when i just saved 3 person in it.... and my db show them....
here is my code in a Seeder class... in the database the CreatorUserId = null .... like WTF? i tried with putting 1.... same result i get null in db... how is it fucking possible that my ID that i put become null ? or why i cant get my users from my context.... i did my SaveChange....
i tried with a _context.Users.First() after the save.... and still it throw no item in the sequence....
and the adminUserForDefaultTenant give me ID 3 when i put a throw new Exception(adminUserForDefaultTenant.Id.ToString()) after the SaveChange... so why it doesn't register as CreatorId 3 when i put it in my NewsCategory?
can anyone help ?
adminUserForDefaultTenant = _context.Users.Add(
new User
{
TenantId = defaultTenant.Id,
UserName = "admin",
Name = "System",
Surname = "Administrator",
EmailAddress = "[email protected]",
IsEmailConfirmed = true,
Password = "AM4OLBpptxBYmM79lGOX9egzZk3vIQU3d/gFCJzaBjAPXzYIK3tQ2N7X4fcrHtElTw==" //123qwe
});
_context.SaveChanges();
_context.NewsCategory.Add(new NewsCategory
{
Category = "Framework",
CreationTime = DateTime.Now,
CreatorUserId = adminUserForDefaultTenant.Id,
IsDeleted = false,
});
_context.SaveChanges();