Hello.
We have application based on ASP.NET MVC 5.x & Angularjs 1.x .NET Framework 4.6.1 v5.6.0 ABP version 3.8 I would like to configure application to work as follow: 1. When user goes to the domainname.com Login page shows up. User logins with ‘remember me’ selected, the browser saves user identity for certain period. After the browser window is closed, when user enters the website address domainname.com, the login page does not show up (user is logged in automatically) and the landing page (dashboard) is displayed. 2. This behavior repeats until user Logout or cached identity expires. At that point user will have to enter valid credentials before the landing page is displayed.
Thank you in advance.
I wasn't understanding how to use the routes property, your link helped and was exactly what I needed, thanks!
Hi,
I am trying to pass it in like the language example but the difference is I am clicking an item in the nav menu. How can I change the code below to pass in the parameter?
).AddItem(new MenuItemDefinition(
PageNames.App.Tenant.RequisitionsService,
L("NewServiceRequisition"),
url: "tenant.requisitionsservice",
icon: "fa fa-circle",
permissionDependency: new SimplePermissionDependency(AppPermissions.Pages_Tenant_Requisitions_Service_Add)
)
The language example passes the parameter in the $state.go function.
Hi, I would like to add parameters to the menu links in the main menu. Currently I have a parent called "Requisitions" and under that I have 3 options and want them all to use the same view but want to pass in a parameter to tell the view the type of requisition. How can I do that?
Here is the NavigationProvider code:
).AddItem(new MenuItemDefinition(
PageNames.App.Tenant.Requisitions,
L("Requisitions"),
icon: "fa fa-files-o"
).AddItem(new MenuItemDefinition(
PageNames.App.Tenant.RequisitionsMaterial,
L("NewMaterialRequisition"),
url: "tenant.requisitionsmaterial",
icon: "fa fa-circle",
permissionDependency: new SimplePermissionDependency(AppPermissions.Pages_Tenant_Requisitions_Material_Add),
customData: new System.Collections.Generic.Dictionary<string, string>() { { "type", "material" } }
)
).AddItem(new MenuItemDefinition(
PageNames.App.Tenant.RequisitionsStock,
L("NewStockRequisition"),
url: "tenant.requisitionsstock",
icon: "fa fa-circle",
permissionDependency: new SimplePermissionDependency(AppPermissions.Pages_Tenant_Requisitions_Stock_Add),
customData: new System.Collections.Generic.Dictionary<string, string>() { { "type", "stock" } }
)
).AddItem(new MenuItemDefinition(
PageNames.App.Tenant.RequisitionsService,
L("NewServiceRequisition"),
url: "tenant.requisitionsservice",
icon: "fa fa-circle",
permissionDependency: new SimplePermissionDependency(AppPermissions.Pages_Tenant_Requisitions_Service_Add),
customData: new System.Collections.Generic.Dictionary<string, string>() { { "type", "service" } }
)
)
Here is the app.js routes:
if (abp.auth.hasPermission('Pages.Tenant.Requisitions')) {
$stateProvider.state('tenant.requisitions', {
url: '/requisitions',
templateUrl: '~/App/tenant/views/requisitions/index.cshtml'
});
$stateProvider.state('tenant.requisitionsmaterial', {
url: '/requisitions/requisition',
templateUrl: '~/App/tenant/views/requisitions/requisition/index.cshtml'
});
$stateProvider.state('tenant.requisitionsservice', {
url: '/requisitions/requisition/',
templateUrl: '~/App/tenant/views/requisitions/requisition/index.cshtml'
});
$stateProvider.state('tenant.requisitionsstock', {
url: '/requisitions/requisition',
templateUrl: '~/App/tenant/views/requisitions/requisition/index.cshtml'
});
}
I have tried these for example on the 'tenant.requisitionsstock' route:
url: '/requisitions/requisition/:stock' (where stock is a string var)
url: '/requisitions/requisition?type=stock'
url: '/requisitions/requisition/{stock}' (where stock is a var {type:'stock'}
When i print out the $stateParams on js side of the view, it's always {stock:""} or {"type:""} or {stock: undefined} Can someone please point me in the right direction. I want to avoid using three different views for each because there are only minor differenes between the three views. Thanks.
Ok so I found the issue, the line of code "Configuration.Features.Providers.Add<AppFeatureProvider>();" is already in the CoreModule by default.
Hi, I am trying to add a simple boolean feature that can be turned on/off per tenant. I have added the feature to the AppFeatureProvider like this:
context.Create(
"Receipt",
defaultValue: "true",
displayName: L("Receipt"),
inputType: new CheckboxInputType()
);
This code is in the AppFeatureProvider class in the SetFeatures() function that were already there.
I then added this code to the MyProjectWebModule class in the App_Start folder:
Configuration.Features.Providers.Add<AppFeatureProvider>();
Now when I run the application I get the error:
Abp.AbpException: "There is already a feature with name Receipt"
It doesn't matter what I put as the name of the feature, I still get the error.
What am I doing wrong?
Thanks.
ASP.NET MVC 5.x & AngularJs 1.x (v8.4.0) VS 2019 (16.5.4) Win 10 (1909)
Hi there, I am trying to get the ASP.NET MVC 5.x & AngularJs 1.x (v8.4.0) to work with .NET framework 4.7.2.
I'm using Visual Studio 2019 and when I change the target frameworks for all the projects in the solution to 4.7.2, the solution builds fine, but won't run.
The error I get is:
[BadImageFormatException: Could not load file or assembly 'System.Data.Common' or one of its dependencies.
System.Data.Common is referenced (nuget). I reinstalled all packages using the package manager console. I've manually removed the reference and installed it again. If I remove it from the web.config, the error just changes to the next referenced package and so on.
Any suggestions?
VS 2019 (16.5.1) Win 10 (1909)