Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "alukaszewski"

Hello,

I must be doing something stupid, or I have missed something but I was under the impression Angular components which reference a stylesUrlwould load the LESS or CSS when the component is rendered? None of my components (nor the base aspnetzero component) styles are being rendered from the included less files. I am trying to modify the login.component.less file, but the less/css file is never loaded by the dom.

What am I doing wrong?

I've just upgraded to 8.9.2 and on my local build it works fine, but when I publish to Azure I am getting this exception:

WARN 2020-06-16 06:22:44,007 [45 ] Abp.BackgroundJobs.BackgroundJobManager - Abp.AbpException: Unknown filter name: MayHaveTenant. Be sure this filter is registered before. at Abp.Domain.Uow.UnitOfWorkBase.GetFilterIndex(String filterName) at Abp.Domain.Uow.UnitOfWorkBase.SetFilterParameter(String filterName, String parameterName, Object value) at Abp.Domain.Uow.UnitOfWorkBase.SetTenantId(Nullable1 tenantId, Boolean switchMustHaveTenantEnableDisable) at Abp.Domain.Uow.UnitOfWorkBase.Begin(UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkManager.Begin(UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.InterceptSynchronous(IInvocation invocation) at Castle.DynamicProxy.AsyncDeterminationInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.BackgroundJobStoreProxy.GetWaitingJobs(Int32 maxResultCount) at Abp.BackgroundJobs.BackgroundJobManager.DoWork() at Castle.Proxies.BackgroundJobManagerProxy.DoWork_callback() at Castle.Proxies.Invocations.BackgroundJobManager_DoWork.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.InterceptSynchronous(IInvocation invocation) at Castle.DynamicProxy.AsyncDeterminationInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.BackgroundJobManagerProxy.DoWork() at Abp.Threading.BackgroundWorkers.PeriodicBackgroundWorkerBase.Timer_Elapsed(Object sender, EventArgs e) Abp.AbpException: Unknown filter name: MayHaveTenant. Be sure this filter is registered before. at Abp.Domain.Uow.UnitOfWorkBase.GetFilterIndex(String filterName) at Abp.Domain.Uow.UnitOfWorkBase.SetFilterParameter(String filterName, String parameterName, Object value) at Abp.Domain.Uow.UnitOfWorkBase.SetTenantId(Nullable1 tenantId, Boolean switchMustHaveTenantEnableDisable) at Abp.Domain.Uow.UnitOfWorkBase.Begin(UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkManager.Begin(UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.InterceptSynchronous(IInvocation invocation) at Castle.DynamicProxy.AsyncDeterminationInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.BackgroundJobStoreProxy.GetWaitingJobs(Int32 maxResultCount) at Abp.BackgroundJobs.BackgroundJobManager.DoWork() at Castle.Proxies.BackgroundJobManagerProxy.DoWork_callback() at Castle.Proxies.Invocations.BackgroundJobManager_DoWork.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.InterceptSynchronous(IInvocation invocation) at Castle.DynamicProxy.AsyncDeterminationInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.BackgroundJobManagerProxy.DoWork() at Abp.Threading.BackgroundWorkers.PeriodicBackgroundWorkerBase.Timer_Elapsed(Object sender, EventArgs e)

It's stating that MayHaveTenant filter is not being registered at startup. I still have in my DbContext base.OnModelCreating(modelBuilder); at the start so I am running out of ideas. Anything simple I could have missed?

Is it possible to pass additional parameters using ModalManager, such as "myParam" below. I wish to pass an id so that the .js loaded as specified by the scriptURL can access this value.

var _MyCustomModal = new app.ModalManager({
    viewUrl: abp.appPath + 'Mpa/MyCustomModal',
    scriptUrl: abp.appPath + 'Areas/Mpa/Views/Common/Modals/_MyCustomModal.js',
    modalClass: 'MyCustomModal',
    myParam: '16777328'
});

I have extended the User Entity using the development guide, to add a new user setting for 'refresh interval' and a new migration is created OK, and the user can get/set this value OK. The Users table is extended OK with new column with default integer value of 300. However, when new users are created how do I set default value there instead of 0 (zero).

I think something in this line is required in the _CreateOrEditModal.cshtml to specify a default value of 300 if no value already set? I'd also wonder how to prevent value enter less than 60?

<input id="EditUser_RefreshInterval" type="text" name="RefreshInterval" class="form-control edited" value="@Model.User.RefreshInterval" maxlength="5">

Also, when new user is created by LDAP authentication - how to ensure default value of 300 is set?

If I create row manually in the database, default value is set to 300 as per the 'default value' attribute of the column - so must be in abp I am missing something?

Thanks,

Andy

How do I get the value of a user setting using a controller? I am trying:

bool UseAutoRefresh = SettingManager.GetSettingValueForUser("UseAutoRefresh");

but Visual Studio is throwing error "No overload for method 'GetSettingValueForUser' takes 1 arguments."

I am able to use SettingManager.GetSettingValue("settingname") in the same controller without a problem - am I missing something?

Also, is it possible to directly access User Settings from Client Side JavaScript - or do I have to use Ajax call for Controller action result?

Thanks.

Question

Hi, is it possible to extend the User Profile/Settings modal? I would like to add another boolean attribute for each user which they can set from the UserSettings modal. What do I need to modify? I have successfully extended global options previously, but I am struggling with adding a simple true/false option for each user. Thanks!

Question

I'm having trouble getting my application to show my custom page for Error 500.

I have added a new Action Result in the ErrorController.cs as follows:

using System.Web.Mvc;
using Abp.Auditing;

namespace Callisto.Web.Controllers
{
    public class ErrorController : CallistoControllerBase
    {
        [DisableAuditing]
        public ActionResult E404()
        {
            return View();
        }

        public ActionResult E500()
        {
            return View();
        }
    }
}

and created /Views/Error/E500.cshtml with modifications to show different number/text.

If I browse to "/Error/E500" I see my custom E500.cshtml page OK.

To test Error 500 condition, I temporarily rename the website folder Mpa/Views/Dashboard folder to "Dashboardzz" and this generates an ASPNETZERO 500 error page but does not redirect to the /Error/E500 page.

I have web.config CustomErrors configured:

<customErrors mode="On">
      <error statusCode="404" redirect="~/Error/E404" />
      <error statusCode="500" redirect="~/Error/E500" />
    </customErrors>

...but no redirect seems to occur to "/Error/E500"

Am I missing something?

Question

How do I use Edition Manager to SET a new version, instead of "Standard" ? I am performing a very primitive license key check (domain/date and bitmask feature check) using my own custom action filter attribute each time the user navigates to a new page controller (Mpa project). When the Home controller is ran, I would like my action filter to set the Edition to "Standard" or "DataCenter" based on my own check against the license key.

Could you advise on how I use SET method of the EditionManager to change Edition DisplayName?

Many Thanks!

Question

I've been banging my head against a wall for the last few hours trying to use the Google Open Sans font WITHOUT the browser having to download it from Google each time. I have tried including the @font-face directive with the font-family 'Open Sans' using local url for the .woff and .woff2 formats - but my ASPNETZERO pages are always going to themes.googleusercontent.com to download three .woff files.

The components-rounded.css is what seems to be setting the use of the 'Open Sans' font and causes the browser to go to Google.

/* Set default body */
body {
  color: #34495e;
  font-family: "Open Sans", sans-serif;
  padding: 0px !important;
  margin: 0px !important;
  direction: ltr;
  font-size: 14px; }

If I remove the font-family line from the above, then no content is pulled from Google but then the page does not use the Open-Sans font. I'm not having any issues using my own custom fonts.css and other fonts I have downloaded locally, but I seem to be struggling just to accomplish what should be a simple thing - using 'Open Sans' from local .woff/.woff2 files.

Could anyone suggest the correct .css and/or which files to download and where/how to reference them within the project?

Thanks!

Where do I find the Migrator.exe console utility? Our project is based on ASPNETZERO 1.6.1.0 - is the console tool in this version? Is using the migrator.exe the recommended way that we would build a new database during the deployment routine which will install our product into a customer environment?

Thanks.

Showing 1 to 10 of 22 entries