这可能是因为无法加密重定向地址导致的。为了解决这个问题,可以在ABP中添加以下代码示例:
在服务端启用加密:
services.AddDataProtection() .PersistKeysToFileSystem(new DirectoryInfo(@"\server\share\directory")) .SetDefaultKeyLifetime(TimeSpan.FromDays(14));
在客户端配置:
abp.ui.setBusy(); abp.utils.setCookieValue( "redirectUrl", window.location.href, new Date(new Date().getTime() + 5000), abp.appPath ); window.location.href = abp.appPath + "Account/Login";
此示例使用ASP.NET Core Data Protection来加密重定向地址,并使用ABP的客户端API实现重定向。