30.6. Offline Support
In the previous steps, if you had a breakpoint in the role provider code on the server, you may have noticed that it hit the breakpoint only the first time you ran the application. The reason for this is that it is caching the role information offline. If you click the "Advanced . . ." button on the Services tab of the project properties designer, you will see that there are a number of properties that can be adjusted to control this offline behavior, as shown in Figure 30-6.
Figure 30.6. Figure 30-6
It's the role service cache timeout that determines how frequently the server is queried for role information. As this timeout determines the maximum period it will take for role changes to be propagated to a connected client, it is important that you set this property according to how frequently you expect role information to change. Clearly, if the application is running offline, the changes will be retrieved the next time the application goes online (assuming the cache timeout has been exceeded while the application is offline).
Clicking the "Save password hash" checkbox means that the application doesn't have to be online in order for the user to log in. The stored password hash is used only when the application is running in offline mode, in contrast to the role information, for which the cache is queried unless the timeout has been exceeded.
Whether the ...
Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.