I’m working through an upgrade from ~v4.3 to v5.6 and hit some issues. I’m hosting on IIS (“nested application”), using Windows auth and “strict” security model. I installed the dotnet 9 bundle and made the necessary changes to align with v5 environments.
Since the first upgrade to v5, none of my endpoints show up in swagger. I can see the page in swagger, and it shows the schemas, but none of the endpoints. “No operations defined in spec!”
I see the following error repeated in system logs:
[ERR][PowerShellUniversal.TimedHostedService] An error occurred running the scheduled job.
Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s);
I can immediately see the swagger page with both new endpoints. I “reload all” config files from admin console. I still see both endpoints. I recycle the IIS application pool, and then I only see the first endpoint in the docs.
This behavior does seem to be reproducible. It suggests that the problem is associated to the role assignment in the second endpoint. Am I doing that incorrectly? I currently assign roles (mapped to AD group claims) to all endpoints.
I’m on 5.6.8 now, and I’m not seeing that error in the system logs anymore. This problem is still present with the API docs. I can repeat the test above with same results.
I also tried adding a required role for the documentation. I can see that I’m granted this role, and I see a link to the docs in the portal, but I get “Failed to load API definition” when I follow the link. I get 403 at the openapi spec url. Is this an auth issue? I can access all the endpoints as expected, but not the documentation.
This issue has me blocked in upgrading higher environments to v5. Any assistance or suggestions would be greatly appreciated. I’d rather not go back to v4.