البته این نام پیشفرض است. اگر نیاز به تعیین نام دیگری بود به این صورت میشود عمل کرد:
<roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="..." cookieName=".ASPXROLES" cookiePath="/" cookieTimeout="30" cookieRequireSSL="false" cookieSlidingExpiration="true" createPersistentCookie="false" cookieProtection="All"> <providers> <!-- .... --> </providers> </roleManager>
- اگر از دات نت 4 و نیم استفاده میکنید، برای حالت کش نشدن این نقشها اخیرا یک patch ارائه شده : (^). مورد چهارم آن.
Assume that you set the value of the cachedRolesInCookie property to true in your web application. Your application serializes the RolePrincipal object into the cookie, and then sends it in response. In this situation, the role cookie value is empty in the application's following request.