Base solution for your next web application

Activities of "razkhan78"

Hi

We are trying to apply ip based access for specific tenants/users, we tried below code but it seems to be firing for each request on system.

app.Use(async (context, next) => { var test = context.Request.Path; IocManager.Instance.Using<TenantManager>(async tenantManager => { if (!tenantManager.ValidateIPAddress()) { throw new AbpAuthorizationException(); } });

            await next.Invoke();
        });
        

Is there any other better approach available? or can we override AbpMVCAuthorize?

Question

Hello

Is there a any way to generate css file from less file ? As we have some less files in project solution but doesn't seems to be changing while save or compile. Let us know if need to install any tool or vsix in visual studio?

Thanks

Hello, We are using AspNetZero (Paid) Product version --> 4.0 Product type --> MVC Product framework type --> .net core

We want to disable logging each and every event happening in system. We only want to log exceptions. Reason: It seems to be affecting system performance significantly.

Please do let us know if there is a way to do so via some configuration changes or any other way?

Hello, We have boilerplate project , in layout.cshtml we have render following css file

<link rel="stylesheet" abp-href="/view-resources/Areas/App/Views/_Bundles/vendors.bundle.css" asp-append-version="true" />

I have alredy added asp-append-version attriubtue that render with version and whenever we change anything in css file it will update in next publish But we abp-href attribute not allowing to render version.

If i replace abp-href with href only then it renders like below on the page

<link rel="stylesheet" href="/view-resources/Areas/App/Views/_Bundles/vendors.bundle.css?v=0l9zLicnowsXZpVQU1j7_kKT4IoqT-6EWfm-5dkrzqo&amp;v=0l9zLicnowsXZpVQU1j7_kKT4IoqT-6EWfm-5dkrzqo" href="/view-resources/Areas/App/Views/_Bundles/vendors.bundle.css" />

Can you please guide us what is the use of abp-href and why it is not working with versioning ?

Our boilerplate version is 4.0

Hello , I am working with boilerplate front-end is Jquery and backed is .Net core . In that for Host user there email setting option available. I have added my sendgrid SMTP credentials but for host user email is not sending.

I have no idea why it is behaving like this. all the host user confifuration is reading in __emailsender object but email is not going

Hello

We are using Feature Edition in our system. And we have started getting this error "FeatureChecker can not get a feature value by name. TenantId is not set in the IAbpSession!".

We are suspecting that this is sometimes happening when in browser we don't have tenant selected. It seems to be some internal code.

So please let us know how we can get solution on this?

Hello we are using asp.net core2.1 and jQuery. We have used datatable in many of our pages and facing strange issue of lost css of datatable.min.css. see attached.

Below are the cases when we are seeing issue. Case 1: 1)Open page - datatable is fine 2)Hit F5 or click reload button on chrome - doing this 2nd or 3rd time causing css issue on pagination , suddenly appears searchbox and paging dropdown gets to the top. 3)If after seeing issue if again do reload it gets back to normal.

Case 2: 1)Open page 2) Go to different page from menu 3)Come back to same page from menu link and issue occurs( css issue on pagination , suddenly appears searchbox and paging dropdown gets to the top) & then only if you do ctrl+F5 then it seems to be gone.

Please let us know on this if it has something to do wih version of datatable.

We have 2 DB on a local server and on the live server.

We have one method that fetches data based on primary key id from "Risks" table.

var riskDetail =  _riskRepository.Get(input.Id??0);

It gives me an error when I run on live server with live db but it is working on local server with local db I have checked live server's DB schema is same, a table is there and data is also there in the table, still, it is giving this error.

We have enable multi-tenancy in our application. In our application we need to display logo(custom logo uploaded by Tenant) on header as well as on some other pages. We have checked that there is one method "GetLogo()" in TenantCustomizationController. This controller exists in Web.Core project.

In "GetLogo()" method, tenantId is retrieved from AbpSession.GetTenantId(). And this tenantId will be passed to database for getting Image bytes from AbpBinaryObjects table. But in our system, we are getting AbpSession.GetTenantId()= null so logo (uploaded by Tenant) is not being displayed.

We are calling HeaderViewModel method "GetLogoUrl" which calls "GetLogo" from TenantCustomizationController. We are getting all values in LoginInformations.Tenant but not in TenantCustomizationController.

Please let us know how should we resolve this.

public class AppNavigationProvider : NavigationProvider
    {
        public const string MenuName = "App";
        public const string MenuTopName = "AppTop";

        private readonly IAbpSession session;

        public AppNavigationProvider(IAbpSession session)
        {
            session = session;
        }
public override void SetNavigation(INavigationProviderContext context)
        {
            var menu = context.Manager.Menus[MenuName] = new MenuDefinition(MenuName, new FixedLocalizableString("Main Menu"));
            menu
                .AddItem(new MenuItemDefinition(
                        AppPageNames.Host.Dashboard,
                        L("Dashboard"),
                        url: "App/HostDashboard",
                        icon: "flaticon-line-graph",
                        requiredPermissionName: AppPermissions.PagesAdministrationHostDashboard,
                        featureDependency: new SimpleFeatureDependency(true, AppFeatures.EnableTracking),
                        isVisible: (session.MultiTenancySide != MultiTenancySides.Host)
                    )
    }
    }
public override void PreInitialize()
        {
            Configuration.Navigation.Providers.Add<AppNavigationProvider>();
        }

We are working on creation of menu dynamically. in MenuItemDefinition there is property isVisible that show/hide menu in the web app we have use session based condition in that.

Our problem is that , when app is started this menu is register using PreInitialize() method. when it goes to AppNavigationProvider class , session value is (session.MultiTenancySide = "Host") because session is null when app is startup. on that bases whole menu item's visible property is set to false , and that menu will not shown to any user, either user is host user or tenant user

Surprisingly featureDependency works dynamically for every user.

could you please help me to solve this issue?

Thanks

Showing 31 to 40 of 44 entries