Code for rowupdating event in gridview
The good news is that the tools at our disposal for applying authorization rules work equally well with roles as they do for user accounts.
URL authorization rules can specify roles instead of users.
In this case, the cookie will not be sent when making requests to subdomains, such as admin.
If you want the cookie to be passed to all subdomains you need to customize the exists is because many user agents do not permit cookies larger than 4,096 bytes.
Technically, I didn't need to specify values for these attributes since I just assigned them to their default values, but I put them here to make it explicitly clear that I am not using persistent cookies and that the cookie is both encrypted and validated. Henceforth, the Roles framework will cache the users' roles in cookies.
If the user's browser does not support cookies, or if their cookies are deleted or lost, somehow, it's no big deal – the Note Microsoft's Patterns & Practices group discourages using persistent role cache cookies.
A more maintainable approach is to use role-based authorization.Since possession of the role cache cookie is sufficient to prove role membership, if a hacker can somehow gain access to a valid user's cookie he can impersonate that user.The likelihood of this happening increases if the cookie is persisted on the user's browser.If the Roles framework is configured to cache the user's roles in a cookie, the class to determine the user's roles. Figure 2: The User's Role Information Can Be Stored in a Cookie to Improve Performance (Click to view full-size image) By default, the role cache cookie mechanism is disabled.It can be enabled through the Note The configuration settings listed in Table 1 specify the properties of the resulting role cache cookie.
Search for code for rowupdating event in gridview:
So this cap is meant to reduce the likelihood of exceeding this size limitation.