500 Internal Error
should have error stack trace at App_Data/Log.txt
.
Can you share it?
Can you check for the errors in Log.txt?
The log file is located at App_Data/Log.txt
by default.
which version of AspNetZero you are using?
Can you check for the errors in Log.txt
?
Also, please share the network request details.
Hi, are you using jquery template? which version?
you can try to remove node_modules
and rebundle the scripts. See aspnetzero documentation
you can inject TenantManager
and use in Intercept()
example from the SO post:
internal class ClientIpAuthorizationInterceptor : IInterceptor
{
private readonly IClientInfoProvider _clientInfoProvider;
private readonly ITenantManager _tenantManager;
public ClientIpAuthorizationInterceptor(
IClientInfoProvider clientInfoProvider,
ITenantManager tenantManager
)
{
_clientInfoProvider = clientInfoProvider;
_tenanrManager = tenantManager;
}
public void Intercept(IInvocation invocation)
{
//more code
//modify the following to check IP addresses from TenantManager
if (clientIpAuthorizeAttribute != null &&
clientIpAuthorizeAttribute.AllowedIpAddress != _clientInfoProvider.ClientIpAddress)
{
throw new AbpAuthorizationException();
}
invocation.Proceed();
}
}
Do note that by reading ip addresses from tenant manager will impact the performance as this interception is triggerred for every web request.
Hi, do you mean ConsoleApiClient
and Tests
?
ConsoleApiClient
is written with API calling.
Tests
is the place for all your unit/integration tests
Hi @david5 , did you make any changes to IdentityServer
configurations?
Limitations
More than one background jobs in a single transaction isn't supported by Hangfire. Because, Hangfire does not participate the current transaction. It does not use the ambient transaction (TransactionScope).
The background job will not be able to retrieve current user id & tenant id. You need to pass these as the parameters to the background job
To enable hangfire integration for AspNetZero.
Configure these hangfire setup.
Web.Core Project
https://github.com/aspnetzero/aspnet-zero-core/blob/29ce1d485ad7955591fa8a97d1d446340c5986e4/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Core/AbpZeroTemplateWebCoreModule.cs#L78
Web.Host Project
https://github.com/aspnetzero/aspnet-zero-core/blob/29ce1d485ad7955591fa8a97d1d446340c5986e4/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Host/Startup/Startup.cs#L185
Web.Mvc Project
https://github.com/aspnetzero/aspnet-zero-core/blob/f72d4bf9ced778e06265f1c415a8553b10cbaf3d/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/Startup/Startup.cs#L161
you can create periodic background job and add to the background queue via BackgroundJobManager
.
See aspnetboilerplate#background-works
To make your background jobs run using Hangfire Integration.