I have made a SharePoint 2013 internet site, it's works fine and loads quickly but when i login for the first time ,it takes about 30 second to authenticate for both windows and forms
i have traced the following forms authntication code
private static bool EstablishSessionWithToken(SecurityToken securityToken)
{
if (null == securityToken)
{
return false;
}
SPFederationAuthenticationModule fam = SPFederationAuthenticationModule.Current;
if (null == fam)
{
return false;
}
fam.SetPrincipalAndWriteSessionToken(securityToken, SPSessionTokenWriteType.WritePersistentCookie);
return true;
}
no exception occurred but specfically it takes 30 seconds at this line
fam.SetPrincipalAndWriteSessionToken(securityToken, SPSessionTokenWriteType.WritePersistentCookie);
after i login successfully ,the next login will be fine and quickly
this problem happened again after one hour or more
i have checked the share point LOGS files but couldn't find any information related to that