Questions tagged [aspnetboilerplate]
Use this tag to ask questions about the previous ASP.NET Boilerplate, a web applications framework. Bug reports and feature requests should be posted to GitHub. For the successor use [tag:abp]
117
questions
39
votes
13
answers
208k
views
What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?
I'm trying to run npm install in the angular project folder I got from ASP.NET Boilerplate and I'm getting an error that is "related to npm not being able to find a file."
D:\Dev\...
17
votes
2
answers
7k
views
Which is the real ASP.NET Boilerplate project?
Might be a dumb question for many but we are thinking of adopting ASP.NET Boilerplate for our next project. Just a bit confused as there seems to be 2 different websites for it and 2 different Git ...
1
vote
1
answer
1k
views
Disable SoftDelete for AbpUserRole
By default, the AbpUserRole and AbpRole implement ISoftDelete. Is it possible to disable it?
I tried to do this:
[AbpAuthorize(AppPermissions.Pages_Administration_Roles_Delete)]
public async Task ...
5
votes
3
answers
2k
views
Should I be calling an AppService from another AppService?
Context
Currently I'm working in a Documents and Records Management System (DRMS?). Because of some technical limitations I need to store a "view" file and a "source" file (DOCX or XLSX). A view file ...
12
votes
4
answers
9k
views
How to get more detailed exception in ABP?
I created a CrudAppService. When I invoke its dynamic API by using swagger, I get a generic 500 error with this description:
{
"result": null,
"targetUrl": null,
"success": false,
"error": {
...
1
vote
5
answers
5k
views
Retrieve child entities from CrudAppService in ABP
The GetAll and Get methods of the ready-made CrudAppService don't include child entities.
Is it possible to modify its behaviour?
Update
GetAllIncluding has some problem if the included entity has ...
1
vote
1
answer
706
views
ASP.NET Boilerplate - Error building new project for MVC and EF combo
I have just downloaded, today, the free startup template for MVC5 and EF.
On opening, restoring all packages then building, I get the following build error in the "Core" project:
Error ...
0
votes
3
answers
3k
views
Integrated Windows Authentication in ABP framework
I'm attempting to use ABP with Windows Authentication rather than Table-based authentication.
The plan is to have the framework:
Detect that the website is in a Windows security context and bypass
...
1
vote
2
answers
502
views
JSON serializer Not Working After Upgrade To 3.6.2
I'm using ASP.NET Boilerplate for one of my application. The application was on 3.5.0 version of Abp and the template was ASP.NET Core with MVC. I recently upgraded it to 3.6.2 the upgrade was fine ...
7
votes
2
answers
5k
views
How to setup Social Login in ASP.NET Boilerplate?
I'm trying to authenticate users through Google.
I'm using the ABP startup template for ASP.NET Core with Vue.
Here's what I have done so far:
I've created a GoogleAuthProviderApi in Web.Core:
...
1
vote
2
answers
1k
views
What is the difference between Roles and Permissions in ASP.NET Boilerplate Template?
In ASP.NET Boilerplate, why does it has roles and permissions to control authorization? Which is the difference between both?
4
votes
6
answers
3k
views
How do you do File Upload method in AppServices for aspnetboilerplate?
I really like aspnetboilerplate framework, I learning/using it now..
How do you do 'File Upload' logic/method in AppServices for aspnetboilerplate? The angular part have I figured out and is working ...
2
votes
1
answer
5k
views
Why doesn't cookie ExpireTimeSpan setting work?
I used:
services.AddAuthenticationCore().ConfigureApplicationCookie(o =>
{
o.ExpireTimeSpan = TimeSpan.FromHours(1);
o.SlidingExpiration = true;
});
to set my authentication cookie ...
1
vote
1
answer
1k
views
DTO mapping exception with entity in ABP
I got an error about "mapping" when I try to insert an entity.
The insert is made by the Create method of a CrudAppService.
My entity inherits from FullAuditedEntity but the related DTO specifies ...
8
votes
4
answers
29k
views
The instance of entity type 'Product' cannot be tracked because another instance with the same key value is already being tracked
I made a test with code below to update the Product:
var existing = await _productRepository.FirstOrDefaultAsync(c => c.Id == input.Id);
if (existing == null)
throw new UserFriendlyException(L(...
5
votes
1
answer
835
views
ASPNET Boilerplate, extending audit log
I am trying to extend the AuditLog entity in ASPNETBOILETPLATE framework in order to add some new properties to it. I have tried to extend the AuditLog class (ExtendedAuditInfo) and implement a ...
4
votes
1
answer
909
views
Is calling a SignalR Hub from the Application Service Layer a bad practice in ASP.Net Boilerplate?
I'm using the Asp.Net boilerplate template with ASP.Net Core 2.1.
I implemented a Hub in the Web.Core assembly and created a controller.
I can subcribe/notify data with my hub from any client, this is ...
2
votes
1
answer
187
views
Abp.Zero.Common, Version=6.0.0.0, Culture=neutra l, PublicKeyToken=null' does not have an implementation.”
System.TypeLoadException:
“Method 'Get' in type 'Abp.DynamicEntityProperties.
DynamicEntityPropertyValueStore' from assembly
'Abp.Zero.Common, Version=6.0.0.0, Culture=neutra
l, PublicKeyToken=null' ...
2
votes
1
answer
1k
views
Getting Ambiguous match found exception while calling DeleteAsync
I have a table which has code as primary key instead of Id, When I call DeleteAsync method I get the exception Ambiguous match found.
[Table("Test")]
public class Test: FullAuditedEntity<int>
...
1
vote
1
answer
2k
views
How to change ASP.NET Boilerplate Angular Template UI Theme (Adminbsb)
I'm starting a project with ASP.NET Boilerplate Angular Template but I want to change the UI theme for another as Core UI theme.
someone who has worked with ASP.NET Boilerplate Angular Template could ...
1
vote
1
answer
1k
views
Promise error in ASP.NET Boilerplate (Core 2.0 + Angular 5) Free Template
I have been using ASP.NET Boilerplate to do CRUD Operations with the database with a REST API client like Postman using custom APIs and so far , it's working quite well.
But then when I move on to ...
1
vote
2
answers
2k
views
How to make composite unique key in ASP.NET Boilerplate?
I have a table which has the Id as primary key, I want to have a composite unique key on Code and Value column. I'm trying in this way.
[Table("Test")]
public class Test: FullAuditedEntity
{
[Key]
...
0
votes
1
answer
117
views
How to use reflection to call a API by string name?
How to call an API in another AppService by string name?
Example: I have an API as below in MyAppService
public class MyAppService : MyAppServiceBase, IMyAppService
{
private readonly ...
0
votes
2
answers
1k
views
How to call web API under specific user permission?
I have a function that allows the end user to execute a Workflow (containing many APIs) or schedule it to run as a background job.
Example: User1 creates Workflow1, which contains 3 APIs (Api1, Api2, ...
0
votes
1
answer
2k
views
'unitOfWork parameter cannot be null' in Background Worker
I've started getting these errors. It was working perfectly on my previous server.
using System;
using Abp.Dependency;
using Abp.Domain.Repositories;
using Abp.Threading.BackgroundWorkers;
using EMS....
0
votes
3
answers
1k
views
Disable Wrapping of Controller Results
I am currently using v3.2.5 of Abp.AspNetCore.
I am trying to integrate an Alpha package of Microsoft.AspNetCore.OData into the project which is so far looking ok.
However when i try and query the ...
0
votes
1
answer
1k
views
Locale DateTime in ABP
I have a DateTime field in popup modal as below that is supposed to only show the time part:
HTML:
<div class='input-group date'>
<input class="form-control" type="datetime" #...
0
votes
1
answer
2k
views
How to use LDAP in ASP.NET Boilerplate (Free Startup Template)
I would like to integrate authentication via Active Directory in my .net Core app using Free Startup Template version of the Boilerplate. I followed the instruction in the documentation such as ...
4
votes
2
answers
16k
views
EF Core - adding/updating entity and adding/updating/removing child entities in one request
I am struggling with what seemed to be a couple of basic operations.
Let's say I've got a class named Master:
public class Master
{
public Master()
{
Children = new List<Child>(...
11
votes
4
answers
3k
views
IdentityServer External auth provider - auth-callback - Redirection - 400 Bad request
I am following
https://www.scottbrady91.com/Angular/SPA-Authentiction-using-OpenID-Connect-Angular-CLI-and-oidc-client and https://www.scottbrady91.com/Angular/Migrating-oidc-client-js-to-use-the-...
4
votes
4
answers
7k
views
Uploading image in ASP.NET Boilerplate
When posting an image, HttpContext.Current.Request is null.
Is there any simple way to achieve this? I am using dropzone.js on client side.
Project is Angular with Web API (ASP.NET Core 2.0) ...
1
vote
2
answers
737
views
Invalid Tenancy Name
I am working on an ASP.NET Boilerplate service project.
When I am saving a client, it returns an error:
Tenancy Name is not valid
The tenancy name contains spaces.
TenantDto maps to Tenant object ...
3
votes
1
answer
6k
views
ASP.NET Boilerplate + IdentityServer
I tried to implement IdentityServer as it is explained at https://aspnetboilerplate.com/Pages/Documents/Zero/Identity-Server
But the sample does not work.
I started a Core 2.0 Angular project from ...
1
vote
2
answers
2k
views
How to use and display PagedResultDto
Using ASPNet Boilerplate, and returning a pagedResultSetDto with the below code, how do I display the page links?
public PagedResultDto<ArticleDto> GetAll()
{
var articleCount = ...
40
votes
7
answers
34k
views
How to set Swagger as default start page?
How do I set Swagger as the default start page in ABP template instead of /Account/Login?
I'm using ASP.NET MVC 5.x + Angular 1.x.
Update
Current code:
public static void RegisterRoutes(...
11
votes
1
answer
2k
views
How to map IdentityServer4 Identity to any WebApp (.Net MVC Boilerplate, .Net Core Boilerplate)
I'm creating an SSO server, to centralize all users in ActiveDirectory(AD) and manage them there instead of the database of each specific application.
To made this server I used IdentityServer4(Idsr4) ...
2
votes
2
answers
8k
views
Change JSON serialization from camelCase to PascalCase [Duplicate-No solution?]
I know this is duplicate of some past questions.But there were no real solution.
One of the related links
Another one
I am working with .Net Core 3 Multipage Template.
I've tried everything like ...
1
vote
1
answer
748
views
Implement OrganizationUnit filter in ASP.NET Core
In ASP.NET Boilerplate, there are built-in Data Filters like Tenant filter, and we could use SetTenantId to enable querying specific tenantId.
As per the official document, it did not support custom ...
20
votes
3
answers
37k
views
response: 413 Request Entity Too Large
When POSTing a request which can contain one or more files (as base64 string) I get this error response:
ERROR 2018-11-22 09:54:18,244 [13 ] Mvc.ExceptionHandling.AbpExceptionFilter - The remote ...
12
votes
10
answers
45k
views
Database operation expected to affect 1 row(s) but actually affected 0 row(s)
I'm trying to insert records in two tables, but getting the exception. Could you please help me to resolve the issue.
First I tried the below code.
await _testRepository.InsertAsync(test);
await ...
5
votes
1
answer
17k
views
How to set session timeout / expiry time in ASP.NET Core MVC?
I am using ASP.NET Zero version 7 of ASP.NET Core, MVC and jQuery project.
I am trying to set session timeout / expiry time to automatically log out from the application when the application is idle ...
4
votes
1
answer
3k
views
ASP.NET Boilerplate multiple databases and DbContexts
I want to connect to two databases at once using ASP.NET Boilerplate. I followed this example: https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/MultipleDbContextEfCoreDemo
...
4
votes
1
answer
2k
views
In what Javascript file "abp.services.app" is defined?
I am integrating my own template to ASP.NET Boilerplate and now I am getting JavaScript errors.
(function() {
$(function() {
var _userService = abp.services.app.user; <-- ERROR HERE
...
3
votes
2
answers
2k
views
Custom API response HTTP status codes with ABP Framework
Is there any way to return custom HTTP Status Codes (like 4xx) with ASP.NET Boilerplate?
I would like to set custom application specific HTTP codes in context of validation to add more granularity. ...
1
vote
1
answer
1k
views
How to add Username to AbpSession
Currently, AbpSession only provides UserId, but I want to use Username instead because it is more explicit so how can I do that? Please help
1
vote
3
answers
2k
views
ASP.NET BoilerPlate: How do I inject object of DbContext in application service?
How do I inject object of DbContext in application service?
Need to access it to create clone of a entity record.
1
vote
3
answers
2k
views
How to do versioning in ASP.NET Boilerplate Web API?
I am trying to do versioning in ASP.NET Boilerplate framework.
I have created two versions in Swagger Gen ("v1.0" and "v2.0") and set API version for Web API, but every time I get all API in both ...
1
vote
1
answer
1k
views
Cannot get header that contains a period from NGINX
The header "Abp.TenantId" is null because of the ".".
If remove the "." (like "AbpTenantId"), it will be ok.
How to add a header with a "."?
=======================================================
...
1
vote
1
answer
652
views
How to open database connection in a BackgroundJob in ABP application
Issue
For testing, I create a new job, it just use IRepository to read data from database. The code as below:
public class TestJob : BackgroundJob<string>, ITransientDependency
{
private ...
1
vote
2
answers
2k
views
Calling SignalR service from a BackgroundWorker in ABP
I have a BackgroundWorker which is supposed to broadcast something to all online clients in 5 seconds interval:
DeactivationBackgroundWorker:
public class DeactivationBackgroundWorker : ...