I want to cache the active directory data i.e Email,firstname and last name two times a day. This should happen behind the scenes maybe in global.aspx application.start(). And now whenevr I want to fetch 1700 (my application allows a functionlaity of browse
users) users I would do that from cached data. My code is in Asp.net C#.
You would cache this data just as any other. Just load it into a dataset and then add it to the cache. You would probably want to use a time based dependancy and have it expire every 12 hours. See info about time based dependancy here,
http://msdn.microsoft.com/en-us/library/ms972379.aspx.
When using cache you want your code to check for the existing of the cached data before you try to use it. If it exist populate the grid, it if doesnt load the data into cache and then populate the grid. I can post some code for that later if you need it.
ActiveDirectory
Marked as answer by Vince Xu - MSFT on Jul 19, 2011 05:41 AM
sweta2408
Member
4 Points
4 Posts
Caching Active Directory
Jul 05, 2011 05:07 PM|LINK
I want to cache the active directory data i.e Email,firstname and last name two times a day. This should happen behind the scenes maybe in global.aspx application.start(). And now whenevr I want to fetch 1700 (my application allows a functionlaity of browse users) users I would do that from cached data. My code is in Asp.net C#.
Can someone let me know the way to do it.
</div>ActiveDirectory
gww
Contributor
2143 Points
458 Posts
Re: Caching Active Directory
Jul 05, 2011 10:38 PM|LINK
You would cache this data just as any other. Just load it into a dataset and then add it to the cache. You would probably want to use a time based dependancy and have it expire every 12 hours. See info about time based dependancy here, http://msdn.microsoft.com/en-us/library/ms972379.aspx.
When using cache you want your code to check for the existing of the cached data before you try to use it. If it exist populate the grid, it if doesnt load the data into cache and then populate the grid. I can post some code for that later if you need it.
ActiveDirectory
senthilwaits
Contributor
3832 Points
651 Posts
Re: Caching Active Directory
Jul 05, 2011 10:53 PM|LINK
Hope this MSDN article will help you.
http://msdn.microsoft.com/en-us/magazine/cc163396.aspx
Senthil Kumar Sundaram