![间歇性 ProviderException:API 因错误“传递给系统调用的数据区域太小”而失败。](https://linux22.com/image/607257/%E9%97%B4%E6%AD%87%E6%80%A7%20ProviderException%EF%BC%9AAPI%20%E5%9B%A0%E9%94%99%E8%AF%AF%E2%80%9C%E4%BC%A0%E9%80%92%E7%BB%99%E7%B3%BB%E7%BB%9F%E8%B0%83%E7%94%A8%E7%9A%84%E6%95%B0%E6%8D%AE%E5%8C%BA%E5%9F%9F%E5%A4%AA%E5%B0%8F%E2%80%9D%E8%80%8C%E5%A4%B1%E8%B4%A5%E3%80%82.png)
在 Windows Server 2008 R2 Enterprise (7601: SP1) 上运行 IIS 7.5.7600.16385。我们的一个网站设置为全局记录错误,我们每隔一两天就会看到这种情况。我们在 web.config 中使用授权属性来检查用户角色的访问权限。这通常由单个部分视图触发,但我们也看到它在获取 css 或 js 资源时偶尔触发。
System.Configuration.Provider.ProviderException: API failed due to error 'The data area passed to a system call is too small. '
at System.Web.Security.WindowsTokenRoleProvider.GetRolesForUser(String username)
at System.Web.Security.RolePrincipal.IsInRole(String role)
at System.Web.Configuration.AuthorizationRule.IsTheUserInAnyRole(StringCollection roles, IPrincipal principal)
at System.Web.Configuration.AuthorizationRule.IsUserAllowed(IPrincipal user, String verb)
at System.Web.Configuration.AuthorizationRuleCollection.IsUserAllowed(IPrincipal user, String verb)
at System.Web.Security.UrlAuthorizationModule.OnEnter(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
我们网站的某些 IIS 设置是否不正确?知道发生了什么吗?