DotNetNuke Module
Silverlight Application
Caching is used to reduce hits to the database. The JohnnyCoder generic cache helper class was used to implement caching.
#region GetCurrentUsersFromCache private static List<DNNChatUser> GetCurrentUsersFromCache(int ModuleId) { string key = String.Format("{0}_DNNChatUser", ModuleId.ToString()); List<DNNChatUser> colDNNChatUser; if (!CacheHelper.Get(key, out colDNNChatUser)) { colDNNChatUser = new List<DNNChatUser>(); CacheHelper.Add(colDNNChatUser, key); } return colDNNChatUser; } #endregion #region GetCurrentMessagesFromCache private static List<MessageContract> GetCurrentMessagesFromCache(int ModuleId) { string key = String.Format("{0}_DNNChatMessages", ModuleId.ToString()); List<MessageContract> colDNNChatMessages; if (!CacheHelper.Get(key, out colDNNChatMessages)) { colDNNChatMessages = new List<MessageContract>(); CacheHelper.Add(colDNNChatMessages, key); } return colDNNChatMessages; } #endregion
DNN Silverlight Chat is designed to be a simple easy to configure chat for a small number of users. The module uses standard web services on port 80 so firewall problems are not an issue.
The entire application that implements real-time communication is constructed with a relatively small amount of code.
Requires ASP.net 3.5 SP1 or higher on the server
Use the install directions for SilverlightDesktop.net as a guide for preparing your DotNetNuke site:
Note: In IIS you will also need to set the MIME Type: Setting .xap MIME Type for Silverlight 2.0
Note: Install and run LinqPrep first.
DNN Module Install and Source from:
http://localhost/dotnetnuke_silverlight/Silverlight20/SilverlightChat/tabid/69/Default.aspx
[Back to: The ADefWebserver DotNetNuke HELP WebSite]
Buy DotNetNuke Modules from Snowcovered |
DotNetNuke™ is a registered trademark of DotNetNuke Corporation.