因此,我尝试在ABP框架中检索最终用户的Windows用户名。根据其他帖子,我了解到我需要在IIS中启用Windows身份验证,同时还要禁用匿名身份验证。但是,当我这样做时,我遇到了“请求过滤模块配置为拒绝查询字符串太长的请求”错误。
我尝试将AllowAnonymous和AbpAllowAnonymous属性添加到我的AccountController,但是仍然出现此递归查询字符串错误。
如果我启用了匿名身份验证,则无法通过以下任何一种方式获取Windows用户名:
HttpContext.Current.Request.LogonUserIdentity.Name
HttpContext.Current.User.Identity.Name
Security.Principal.WindowsIdentity.GetCurrent().Name
感谢您提供的任何帮助。