Why the PUT may be skipped
Definitive checks and fixes
Server-side note for encrypted scenarios (ABP ≥ 7.0 validates connection strings):
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IConnectionStringChecker))]
public class EncryptedConnectionStringChecker
: SqlServerConnectionStringChecker, IConnectionStringChecker, ITransientDependency
{
private readonly IStringEncryptionService _encryption;
public EncryptedConnectionStringChecker(IStringEncryptionService encryption)
{
_encryption = encryption;
}
public override async Task<AbpConnectionStringCheckResult> CheckAsync(string connectionString)
{
var decrypted = _encryption.Decrypt(connectionString);
return await base.CheckAsync(decrypted);
}
}
Part 2 — SQL Server remote/named instance support and formats
What ABP supports
Recommended connection string formats
Behavior expectations
Actionable guidance for your case
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Code example:
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Volo.Abp.Auditing;
public class SelectiveGetAuditingMatcher : IAuditingMiddlewareMatcherContributor
{
public void Contribute(AuditingMiddlewareMatchingContext context)
{
var httpContext = context.HttpContext;
// Skip non-HTTP GET requests
if (!HttpMethods.IsGet(httpContext.Request.Method))
{
return;
}
// If endpoint metadata contains [DisableAuditing], skip.
var endpoint = httpContext.GetEndpoint();
if (endpoint?.Metadata?.GetMetadata<DisableAuditingAttribute>() != null)
{
return;
}
// Example 1: match by route template (controller/action)
var routeData = httpContext.GetRouteData();
var controller = routeData?.Values["controller"]?.ToString();
var action = routeData?.Values["action"]?.ToString();
// Only audit specific GET actions:
if ((controller, action) is ("Orders", "GetDetails") or ("Reports", "GetMonthly"))
{
context.Matches = true; // audit this request
return;
}
// Example 2 (optional): match by path prefix
// if (httpContext.Request.Path.StartsWithSegments("/api/my-important-read"))
// {
// context.Matches = true;
// }
}
}
Register the contributor and keep IsEnabledForGetRequests = false:
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAuditingOptions>(options =>
{
options.IsEnabledForGetRequests = false; // keep default
options.AlwaysLogOnException = true; // still log failures
// Add our selective matcher contributor
options.Middlewares.Add(new AuditingMiddlewareConfiguration
{
Contributors =
{
new AuditingMiddlewareContributor(typeof(SelectiveGetAuditingMatcher))
}
});
});
}
Notes:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Workarounds you can apply immediately:
Notes:
Status:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Try these, in order:
RouterModule.forRoot(routes, { onSameUrlNavigation: 'ignore' })
@Injectable({ providedIn: 'root' })
export class ManageProfileFormState {
form = this.fb.group({
userName: [''],
email: [''],
name: [''],
surname: [''],
phoneNumber: [''],
});
constructor(private fb: FormBuilder) {}
}
@Component({ /* account manage tab component */ })
export class PersonalInfoTabComponent {
form = this.state.form;
constructor(private state: ManageProfileFormState) {}
}
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
What you observe is not an ABP feature. ABP Angular apps are standard Angular SPAs. Resizing the browser (switching between desktop/mobile widths) should not reload the route or recreate your page component by itself. If your form loses state, it’s typically caused by one of these in your Angular app:
How to fix:
// app.component.ts (or any global service)
@HostListener('window:resize', ['$event'])
onResize() {
// Do NOT call location.reload() or window.location.href changes here.
// Do NOT call router.navigate(...) here just for responsive behavior.
}
RouterModule.forRoot(routes, { onSameUrlNavigation: 'ignore' })
Reference: Angular Router docs for onSameUrlNavigation.
// Keep form in a service to preserve state across template swaps
@Injectable({ providedIn: 'root' })
export class MyFormState {
form = this.fb.group({ name: [''], /* ... */ });
constructor(private fb: FormBuilder) {}
}
@Component({...})
export class MyPageComponent {
form = this.state.form; // bind same instance
constructor(private state: MyFormState) {}
}
Make sure no breakpoint observer or theme code triggers navigation:
Quick checklist:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Goal: https://localhost:44320/api/auth should be the app’s base URL. Key rule: When you use app.UsePathBase("/api/auth"), every incoming request path and every generated URL must include /api/auth.
Apply these steps to your HttpApi.Host:
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
app.UsePathBase("/api/auth");
app.UseRouting();
app.UseStaticFiles();
app.UseAbpStudioLink();
app.UseAbpSecurityHeaders();
app.UseCors();
app.UseAuthentication();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseDynamicClaims();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
// Swagger endpoint MUST include the PathBase prefix
options.SwaggerEndpoint("/api/auth/swagger/v1/swagger.json", "API");
// And make Swagger UI itself available under /api/auth/swagger
options.RoutePrefix = "api/auth/swagger";
});
app.UseConfiguredEndpoints();
}
{
"App": {
"SelfUrl": "https://localhost:44320/api/auth"
}
}
ABP uses App:SelfUrl for various generated links. If you keep it without the prefix, some URLs will be wrong.
Keep controller routes as-is You do NOT need to change [Route("api/...")] attributes or conventional controller prefixes. PathBase sits in front of the entire app, so /api/auth/api/values would be wrong. Correct request is /api/auth/api/values, which is “/api/auth” (PathBase) + “/api/values” (your controller route). Don’t double-prefix routes.
Swagger JSON endpoint path With PathBase, the JSON is served at /api/auth/swagger/v1/swagger.json. Ensure:
Anti-forgery and ABP Swagger UI script ABP’s Swagger integration injects abp.js to handle CSRF. With PathBase, the SetCsrfCookie endpoint will resolve correctly as long as App:SelfUrl and PathBase are consistent and the Swagger UI page is under the same PathBase.
If you also expose static assets under the same site Call app.UseStaticFiles() after UsePathBase so static files are served via /api/auth/… when requested from this host.
Common pitfalls that cause 404 in Swagger:
Optional (only if you must run the UI at root /swagger while API is under /api/auth):
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Where to see logs during development
How to confirm or change the file location
Increasing verbosity to capture errors
Production recommendations
Quick checklist
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Where to run the command
The command to use (Angular)
Prerequisites and configuration that affect detection
Forcing regeneration or when new endpoints are not detected
Notes for reliable results
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
A) Always run migrations + seed via DbMigrator first
B) Verify the connection string used by all processes
C) Ensure seeding is invoked if you rely on hosts (not only DbMigrator)
public override async Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
{
var seeder = context.ServiceProvider.GetRequiredService<IDataSeeder>();
await seeder.SeedAsync(); // idempotent; safe to call
}
D) Confirm your IDataSeedContributor discovery
public class MyDataSeedContributor : IDataSeedContributor, ITransientDependency
{
public async Task SeedAsync(DataSeedContext context)
{
// idempotent seeding
}
}
E) Check OpenIddict client seeding inputs
F) Ensure migrations include all module tables
G) Swagger/Angular UI missing on API
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "My API");
});
H) Make seeding resilient and repeatable
I) Quick local recovery steps
This approach aligns with common ABP conventions, but specific official documentation for every point in this exact scenario is not available.
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Apply the checklist below exactly in this order:
Trust and use HTTPS dev certificate
Ensure the HttpApiHost really runs and listens
Fix ports in Angular environment
Enable CORS for Angular origin
Use HTTPS in Angular OAuth config
Clear stale Angular dev state
Confirm application-configuration endpoint manually
Most common root causes for exactly this symptom:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.