tag:blogger.com,1999:blog-55602779210832696422024-03-06T00:11:14.758+08:00SharePoint MalayaAll about SharePoint programming, configuration, technology, best practices and newsMohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.comBlogger72125tag:blogger.com,1999:blog-5560277921083269642.post-41233999545978880072016-04-01T21:02:00.000+08:002016-04-01T21:02:17.601+08:00Assalamualaikum & salam sejahtera.<br />
<br />
It has been a while. Here we go...Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-14447772615312878072011-06-06T22:19:00.001+08:002011-06-06T22:19:45.345+08:00Get Ready! It’s Crazy, But Rewarding<p>I’ve been very busy lately – My Google Reader’s unread subscriptions are getting bigger and bigger. I’ll try my best not to click on the “<strong>Mark all as read</strong>” button.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7m6GySNtRKIaNnKYP4MeYPZ8cGWXFsKm4Xnob_si9UGBHdIQ2PnsF9ucIBcGw8Y_48cGNV1IGJ6b9J2q-T3WIugUz4iiz1oB0SVQrvUH7DIFiS3cEkkX62810b6EIDpdD07iARuR8nSg/s1600-h/image%25255B7%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkLAx4QxHhOsm51Vk6jNKaRgIO3Ohypl0cCTPcVPyO68vngfS8prWvyvdPwQE1xhEeb1XiXedGRvZHeHFtflZYAAuEsym72iQRy2SPHXG2Jxomw1iVItdS36u1jOB-AuJdDnF0GTVAny0/?imgmax=800" width="216" height="619" /></a></p> <h4>Get ready to work harder than you ever have before once you’re working for yourself! </h4> <h4>It's crazy, but <u>REWARDING</u>!</h4> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com2tag:blogger.com,1999:blog-5560277921083269642.post-35430804448994079832011-05-27T11:02:00.000+08:002011-05-27T11:02:00.931+08:00My Last Day @ CustomWare<p>Today is my last day at one of the greatest company that I’ve worked with – <a href="http://www.customware.net">CustomWare</a>. I truly am humbled to have worked with such a group of <strong>“get in and get it happening people”</strong> and I am so proud of the achievements that the company have accomplished. I’ve learned a great deal here both in technology & <a href="http://www.customware.net/repository/display/CustomWare/About+Us">core values</a>, and will definitely miss all of you.</p> <p>What next for me?</p> <ol> <li>Continue with my house renovation (has been delayed for few months!)</li> <li>Finish up Thesis for Master in IT and hopefully set up VIVA with university panel by July, 2011 (unbelievable!, this has been delayed for more 3 years!)</li> <li>Sit for <a href="http://www.microsoft.com/learning/en/us/certification/mct.aspx">MCTs</a> exams</li> <li>Help out my wife’s company to expand training business</li> <li>Be <strong>“househusband”</strong> for at least 3 months and the best part is: I can now teach SharePoint to <a href="http://www.flickr.com/photos/sukandsa/3708779155/in/photostream">my kids</a> <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh4.ggpht.com/-hCx7ar2d3wQ/Td8UJDbEdLI/AAAAAAAAASM/S3ftZ5BWXcg/wlEmoticon-smile%25255B2%25255D.png?imgmax=800" />.</li> </ol> <p>Cheers</p> <p>Mohd Sukri</p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com2tag:blogger.com,1999:blog-5560277921083269642.post-9743754335100878042011-04-23T16:33:00.001+08:002011-04-23T16:33:36.786+08:00SharePoint Cartoons<p>Something that I found hilarious <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1KDH_OYjIwy7gZhKWGIjCrXNIOwha6s2yPfKYa7sEhLOrSaRvXIEeN58tZy8zXO3d984Iwk8MNVBYEj3Xc019RYbXiO-zbvpjLh9P9ny-PUCB4KxZBdR6wMt-dRbTCVvpd4_d5lzy6fo/?imgmax=800" />:</p> <table border="0" cellspacing="0" cellpadding="2" width="500"><tbody> <tr> <td valign="top" width="250"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEZlpjfbqD4ct8GBXs5SEUDPPgP8m0JMT6Hbg9p9DyZwKuQWVLr2l4yRinLPxdpELWHZONbqQ5mUDHh5QrwgjHPLrtoxfFE775tTJvxgIpgGIJcMcHkm61MNAoZzRb076hnvLVD2Qe2Og/s1600-h/image%5B13%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLPiiF-PpEnMNiNmUYiPbSvFqjCY4O9UXiiCQw_awgeogWfXdCxmBQTGKW97oRWJgIotvnuvKW0oPRfnLecZaILC6YSGckpBMBtcjGMCWfWOnRvxGRhc5wjjsrtPX1_YdyCwbISMyGCEE/?imgmax=800" width="373" height="465" /></a></td> <td valign="top" width="250"><a href="http://lh4.ggpht.com/__zJylaorRD0/TbKOydpEbII/AAAAAAAAARg/bWH_90MdiZk/s1600-h/image%5B37%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/__zJylaorRD0/TbKOzGFgjiI/AAAAAAAAARk/lgBB7EbCp3w/image_thumb%5B25%5D.png?imgmax=800" width="361" height="484" /></a></td> </tr> <tr> <td valign="top" width="250"><a href="http://lh3.ggpht.com/__zJylaorRD0/TbKOzoXiGnI/AAAAAAAAARo/L8d9PmEe0-o/s1600-h/image%5B38%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnzUaDBy_a7JD8OZdDGozqf5Ka5v4xz55bECpMrcpnEgOhwqioRhyELhs476FnQMnqb3vhZUju2pq5ptqNi48IKi1LwbACKh-bynmxBH4PK3OFbYs4xir-QOED3PE4EL0DvhDi7FZMZu4/?imgmax=800" width="371" height="467" /></a></td> <td valign="top" width="250"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-bzNdEWhRR-Pg4Sd7r0e3QP9ukF221iMxe3Ta5woDfvRIuUExIE8iFAVlSibI0bTATwQD8G7H6JgFwJ4w9t2iJXDP8l1_EmmCL4rZ0wBWRiyzq5juZ3eu4bR80sxXuUFrNjBi4KSUFng/s1600-h/image%5B39%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4LXWlUWvASZ1nwrnDerzkPUBV2v_sFe47qWPOBaNC1RShjlH4suomOWaCPRjt-RN3ADXcWKYa1S4RiB2QXG0Uzc5PAx3eLBfZ6qmRhkW2MY7JrF7Y22T6UwaBr67_t4-IMeR6hxVEM0o/?imgmax=800" width="375" height="455" /></a></td> </tr> <tr> <td valign="top" width="250"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFys-KhaZb3szsyA3lbsfccv4xlBZMmkY01ZbJCTz0rl0nOBogMDJH-j1sZj5OwhftLmLw-vw9swK3TBlikHii9OS6tBkqINaYkm9DK7t9wp3uZZJ_SVG1nKt83itruIObDHOGfEFAqAw/s1600-h/image%5B41%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/__zJylaorRD0/TbKO2-O5VSI/AAAAAAAAAR8/Gd7BT3Pk5RA/image_thumb%5B29%5D.png?imgmax=800" width="372" height="475" /></a></td> <td valign="top" width="250"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpjc5ETZsvggBfbA6dNNtJJQts5fNIHvbFmOB6Xz0BSFjmM418TKYobD29KVEKSxglIYZGdcrxlDFtWIODVGvusrtfxnWb_ZneWdbmy6OMZC514ymYMWrBNhWBDTyccoNP3jY9nNNXzxE/s1600-h/image%5B42%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAAekeSA6QfTQMKQq1NHWoJIgfZffwnnf7YMtUnMdHIU_6iSr7aa8wiO9qNVRNbksycxiZG6NB9ACxAIS0IofofZMD36EALk2CvOv-2vwsCVtPovUXtZ5ZY8nrOzzoyNI86-t5albBEg4/?imgmax=800" width="362" height="470" /></a></td> </tr> </tbody></table> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-35196576952342940482011-04-23T16:16:00.001+08:002011-04-23T16:16:56.197+08:00Code to Browse the Security Setup of SharePoint Site Collection<p>In case if you need to verify the security setup of your SharePoint site collection, you just need to run the following code as shown below:</p> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p>using System; <br />using System.Linq; <br />using Microsoft.SharePoint;</p> <p>namespace BrowseSecurity <br />{ <br />    class Program <br />    { <br />        static void Main(string[] args) <br />        { <br />            BrowseSecurity("<a href="http://localhost");">http://localhost");</a> <br />            Console.Out.WriteLine(true); <br />        }</p> <p>        private static void BrowseSecurity(string url) <br />        { <br />            using (SPSite site = new SPSite(url)) <br />            { <br />                SPWeb web = site.OpenWeb(); <br />                Console.WriteLine("\n\nUsers:"); <br />                foreach (SPUser user in web.Users) <br />                { <br />                    Console.WriteLine(user.Name); <br />                }</p> <p>                Console.ReadLine(); <br />                Console.WriteLine("\n\n All Users:"); <br />                foreach (SPUser user in web.AllUsers) <br />                { <br />                    Console.WriteLine(user.Name); <br />                } <br />                Console.ReadLine(); <br />                Console.WriteLine("\n\n Site Users:"); <br />                foreach (SPUser user in web.AllUsers) <br />                { <br />                    Console.WriteLine(user.Name); <br />                } <br />                Console.ReadLine(); <br />                Console.WriteLine("\n\n Roles:"); <br />                foreach (SPRole role in web.Roles) <br />                { <br />                    Console.WriteLine(role.Name); <br />                } <br />                Console.ReadLine(); <br />                Console.WriteLine("\n\n Roles Definitions:"); <br />                foreach (SPRoleDefinition roledef in web.RoleDefinitions) <br />                { <br />                    Console.WriteLine(roledef.Name); <br />                } <br />                Console.ReadLine(); <br />                Console.WriteLine("\n\n Roles Assignments:"); <br />                foreach (SPRoleAssignment roleA in web.RoleAssignments) <br />                { <br />                    Console.WriteLine("The following Role definition bindings exist for " + <br />                    roleA.Member.Name); <br />                    foreach (SPRoleDefinition roledef in roleA.RoleDefinitionBindings) <br />                    { <br />                        Console.WriteLine(roledef.Name); <br />                    } <br />                } <br />                Console.ReadLine(); <br />                Console.WriteLine("\n\n Groups:"); <br />                foreach (SPGroup group in web.Groups) <br />                { <br />                    Console.WriteLine(group.Name); <br />                } <br />                Console.ReadLine(); <br />            } <br />        } <br />    } <br />}</p> </div> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-37917979053433195162011-04-17T16:42:00.001+08:002011-04-17T16:42:07.534+08:00Send Email in SharePoint via .NET SmtpClient Class and SharePoint SPUtility Class<p>In SharePoint, you could send email programmatically by using either <strong>.NET Class Library</strong> or <strong>SharePoint Object Model</strong>. I always prefer the second method since using SharePoint ensures that the required settings are maintained by <strong>Central Administration</strong>.</p> <p>The following show the two code examples on how you could do this:</p> <h4>Sending Email via .NET SmtpClient Class</h4> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p>using System.Net.Mail; <br />using Microsoft.SharePoint;</p> <p>/// <summary> <br />/// Sends the mail via NET SmtpClient. <br />/// </summary> <br />/// <param name="Subject">The subject.</param> <br />/// <param name="Body">The body.</param> <br />/// <param name="IsBodyHtml">if set to <c>true</c> [is body HTML].</param> <br />/// <param name="From">From.</param> <br />/// <param name="To">To.</param> <br />/// <param name="Cc">The cc.</param> <br />/// <param name="Bcc">The BCC.</param> <br />/// <returns></returns> <br />public static bool SendMailviaNET(string Subject, string Body, bool IsBodyHtml, string From, string To, string Cc, string Bcc) <br />{ <br />    bool mailSent = false; <br />    try <br />    { <br />        SmtpClient smtpClient = new SmtpClient(); <br />        smtpClient.Host = SPContext.Current.Site.WebApplication.OutboundMailServiceInstance.Server.Address; <br />        MailMessage mailMessage = new MailMessage(From, To, Subject, Body);</p> <p>        if (!String.IsNullOrEmpty(Cc)) <br />        { <br />            MailAddress CCAddress = new MailAddress(Cc); <br />            mailMessage.CC.Add(CCAddress); <br />        } <br />        if (!String.IsNullOrEmpty(Bcc)) <br />        { <br />            MailAddress BCCAddress = new MailAddress(Bcc); <br />            mailMessage.Bcc.Add(BCCAddress); <br />        }</p> <p>        mailMessage.IsBodyHtml = IsBodyHtml; <br />        smtpClient.Send(mailMessage); <br />        mailSent = true; <br />    } <br />    catch (Exception) <br />    { <br />        return mailSent; <br />    } <br />    return mailSent; <br />}</p> </div> <h4>Sending Email via SharePoint SPUtility Class</h4> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p>using Microsoft.SharePoint; <br />using Microsoft.SharePoint.Utilities; <br />using System.Collections.Specialized;</p> <p>/// <summary> <br />/// Sends the mail via SharePoint SPUtility. <br />/// </summary> <br />/// <param name="Subject">The subject.</param> <br />/// <param name="Body">The body.</param> <br />/// <param name="IsBodyHtml">if set to <c>true</c> [is body HTML].</param> <br />/// <param name="From">From.</param> <br />/// <param name="To">To.</param> <br />/// <param name="Cc">The cc.</param> <br />/// <param name="Bcc">The BCC.</param> <br />/// <returns></returns> <br />public static bool SendMailviaSharePoint(string Subject, string Body, bool IsBodyHtml, string From, string To, string Cc, string Bcc) <br />{ <br />    bool mailSent = false; <br />    try <br />    { <br />        SPWeb thisWeb = SPContext.Current.Web; <br />                <br />        StringDictionary headers = new StringDictionary(); <br />        headers.Add("to", To); <br />        headers.Add("cc", Cc); <br />        headers.Add("bcc", Bcc); <br />        headers.Add("from", From); <br />        headers.Add("subject", Subject); <br />        if (IsBodyHtml) headers.Add("content-type", "text/html");</p> <p>        mailSent = SPUtility.SendEmail(thisWeb, headers, Body); <br />    } <br />    catch (Exception) <br />    { <br />        return mailSent; <br />    } <br />    return mailSent; <br />}</p> </div> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-73431336285686715302011-04-16T11:46:00.000+08:002011-04-16T11:59:25.781+08:00SPMalaya Google Search (SPMalaya.CSEWP) Web Part (Licensed-Free)<p><strong>SharePoint Malaya (SPMalaya) Google Search Web Part (SPMalaya.CSEWP)</strong> for SharePoint 2010 allows you to harness the power of <strong>Google Custom Search Engine (CSE)</strong> to create a customized search experience for your SharePoint sites.</p> <p>SPMalaya Google Search comprises of four (4) Web Parts:</p> <ul> <li><strong>SPMalaya Google Search Box and Results Web Part</strong> displays a search box that allows users to search for information via Google Custom Search Engine (CSE). Search results are displayed on the same page (i.e. search element) that provides the most layout and customization options.</li> <li><strong>SPMalaya Google Search Box Web Part</strong> displays a search box that allows users to search for information via Google Custom Search Engine (CSE). Search results can be displayed on either Google-hosted page, SharePoint Default page or any SharePoint Custom page.</li> <li><strong>SPMalaya Google Search Results Web Part </strong>displays the search results and the properties associated with Google Custom Search Engine (CSE). You will need to configure hosting page option in the Google Search Box Web Part in order for this web part to work.</li> <li><strong>SPMalaya Content Best Bet Web Part</strong> displays high-confidence best bet related to the content of your page.</li> </ul> <p> </p> <p><a href="http://lh3.ggpht.com/__zJylaorRD0/TakSpODd9sI/AAAAAAAAARE/_ENLZ77K7uU/s1600-h/image%5B4%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_6YxoTugq_vZRCNz80k6gtYkiX9d_fkS2nWPRr9JUfhCKnOfsFSQwLUE6N5OQQlCH8ruHMQFV0hI9SiPyzti1CQfrWEfidulpYNiZeQ-n7XuMIIu5NSKHN7Z35ikegPpq7StzHqzR9B4/?imgmax=800" width="641" height="313" /></a></p> <p>For more information about SPMalaya Google Search functionalities:</p> <p><iframe title="YouTube video player" height="390" src="http://www.youtube.com/embed/QCFdPDpMpqU" frameborder="0" width="640" allowfullscreen="allowfullscreen"></iframe></p> <h4><a name="_Toc290388160">1.1 About the License</a></h4> <p>SPMalaya Google Search is licensed free of charge.</p> <p><em>BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.</em> </p> <p>For more information about <strong>End User License Agreement (EULA)</strong>, see <strong>Microsoft Public License (Ms-PL):</strong> <a href="http://www.opensource.org/licenses/ms-pl">http://www.opensource.org/licenses/ms-pl</a></p> <h4>1.2 Installer</h4> <p>The SPMalaya Google Search installer can be downloaded from here: <a href="http://ge.tt/3AOYDL7/SPMalaya.CSEWP.Setup.v1.0.0(SP2010).zip?type=download">SPMalaya Google Search Web part Installer v1.0.0 (SharePoint 2010)</a></p> <h4><a name="_Toc290388161">1.3 Documentation</a></h4> <p>The SPMalaya Google Search <strong>Installation and Configuration Guide</strong> is included with your distribution package. It is also downloadable at: <a href="http://ge.tt/5lXMDL9/SPMalaya%20Google%20Search%20Installation%20and%20Configuration%20Guide%20v1.0.0.pdf?type=download">SPMalaya Google Search Installation and Configuration Guide v1.0.0 (SharePoint 2010)</a></p> <p>Online version is also available at: <a href="http://sharepointmalaya.blogspot.com">http://sharepointmalaya.blogspot.com</a></p> <h4><a name="_Toc290388162">1.4 Getting Supports</a></h4> <p>Ladies and Gents,</p> <p>I created this product as part of my hobbies and certainly I am not working full time - I work on <strong><u>WEEKENDS ONLY</u> (I wish my kids went to bed at 9pm each night on weekends<u>)</u></strong>! </p> <p>So, if you have any support issues, feel free to put your comments on this page: <a href="http://sharepointmalaya.blogspot.com">http://sharepointmalaya.blogspot.com</a>. If I unable to come back to you in a timely fashion, then I am sure you will get help from the communities ;).</p> <h4><a name="_Toc290388163">1.5 Feature Requests</a></h4> <p>I am very happy and pleased for any and all user feedback, and value your opinions in this regard. Please tell me! </p> <p>Again, feel free to put your comments on this page: <a href="http://sharepointmalaya.blogspot.com">http://sharepointmalaya.blogspot.com</a>. Alternatively, you can email me at <a href="mailto:sharepointmalaya@gmail.com">sharepointmalaya@gmail.com</a></p> <p>Kind regards, </p> <p><strong>Mohd Sukri, </strong></p> <p><strong>Kuala Lumpur (Malaysia), about me: </strong><a href="http://about.me/mohdsukri"><strong>http://about.me/mohdsukri</strong></a></p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-21778235416527608182011-03-28T21:26:00.001+08:002011-03-28T21:26:22.074+08:00Accessing SharePoint 2010 Logging Database<p>By default, the database is called <strong>WSS_Logging</strong> should be the starting point for administrators and developers to collect and analyse information. The following demonstrates how to access the database and run a view (that already is installed) against it.</p> <ul> <li>Open up <strong>SQL Server Management Studio</strong> </li> <li>When asked for authentication, log in to the correct instance where SharePoint is running using your windows authentication credentials </li> <li>Navigate to the <strong>WSS_Logging</strong> database and click on the <strong>plus sign </strong>to expand it as shown in figure below:</li> </ul> <p><a href="http://lh6.ggpht.com/__zJylaorRD0/TZCMbFu9VMI/AAAAAAAAAQQ/0ugTz_3q_hU/s1600-h/image%5B8%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/__zJylaorRD0/TZCMb7sjlXI/AAAAAAAAAQU/lbUcU9-uOrE/image_thumb%5B4%5D.png?imgmax=800" width="241" height="545" /></a></p> <ul> <li>Under the toolbar at the top, click on the <strong>New Query </strong>button </li> <li>In the new query window, type in the following query:</li> </ul> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p>SELECT * FROM RequestUsage</p> </div> <ul> <li>Click <strong>Execute</strong>. </li> <li>Results are populated in the window pane below the query, as seen in the following screenshot: </li> </ul> <p><a href="http://lh3.ggpht.com/__zJylaorRD0/TZCMch_kp1I/AAAAAAAAAQY/Ih_0vs_Rvq0/s1600-h/image%5B12%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/__zJylaorRD0/TZCMdozXQcI/AAAAAAAAAQc/qTrPEYJFXNI/image_thumb%5B6%5D.png?imgmax=800" width="875" height="95" /></a></p> <p><strong>RequestUsage </strong>is an out of the box view that provides site usage information. It provides information such as the referring URL, the browser being used, the site ID, the web ID, the server URL, the request type, and when it was done. There are 24 views installed by default as shown in figure below:</p> <p><a href="http://lh4.ggpht.com/__zJylaorRD0/TZCMeO5bwPI/AAAAAAAAAQg/OG7aE3AuaoA/s1600-h/image%5B16%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/__zJylaorRD0/TZCMfGYg8OI/AAAAAAAAAQk/ESigs-re-EE/image_thumb%5B8%5D.png?imgmax=800" width="438" height="492" /></a></p> <p>The logging database contains, but is not limited to, the following information:</p> <ul> <li>ULS logs </li> <li>NT event logs </li> <li>Performance counters </li> <li>Feature usage </li> <li>Blocking queries </li> <li>Site usage </li> <li>Timer job information </li> </ul> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-59734917904864265092011-03-28T20:45:00.001+08:002011-03-28T20:49:11.959+08:00Web Part Public Properties, Attributes and Type of Attributes<p>You can decorate the public properties of the web part class with the following attributes from <strong>System.ComponentModel</strong> so that your web part can runs in a stateless environment, like SharePoint:</p> <ul> <li><strong>WebDisplayName</strong> - This string shows as the label for the control in the Editor pane. </li> <li><strong>WebDescription</strong> - This string shows as a tooltip over the display name. </li> <li><strong>WebBrowsable</strong> - When this Boolean is set to true, the end user will be able to see the property in the Editor pane. Set it to false to imperatively set the property’s value on behalf of the end user. </li> <li><strong>Personalizable</strong> - This enum has two settings: <ul> <li><em>PersonalizationScope.Shared</em> indicates that SharePoint should only store one value for everyone. </li> <li><em>PersonalizationScope.User </em>indicates that SharePoint should still store one common value for everyone, but allow anyone who has permission to personalize to change that value to whatever he or she would like it to be. </li> </ul> </li> </ul> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSn5UR45nBuGOkR4-jkp-p62zL1JkO49JeYU9xJwZdC7fuMln0QxYmL4De3lSM_iqQ73jpsKO1rRO1W1KznGDsaRigZ0MlmPo0ZaCeZ2R0Rol7M67BOd3Yw5-jAp6foiGvla7urjEtat0/s1600-h/image6.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkqjMrTJgAkIJAzZljUpV8555rYlGn-o6LFWwUh1gedA8O9JUxhTxnf6-oPZpga4qusIHYxHbOqodbkWT0CjgREU7QPp397PNWEOmCV5NcyZmnczmCqOpptxvm7v5M_-CCQwSdhZwecl8/?imgmax=800" width="382" height="254" /></a></p> <p>The following code example demonstrates how to use these attributes:</p> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p>    [ToolboxItemAttribute(false)] <br />    public class VisualWebPart1 : WebPart <br />    { <br />        private string _jobTypeName = string.Empty; <br /> <br />        [WebDisplayName("Job Type"), <br />        WebDescription("Specify your job."), <br />        WebBrowsable(true), <br />        Personalizable(PersonalizationScope.Shared)] <br />        public string JobTypeName <br />        { <br />            get { return _jobTypeName; } <br />            set { _jobTypeName = value; } <br />        } <br />    }</p> </div> <p>Each public property can have a unique set of attributes. SharePoint supports several different types:</p> <ul> <li><strong>string</strong> - Rendered as a textbox </li> <li><strong>bool</strong> - Rendered as a checkbox </li> <li><strong>datetime</strong> - Rendered as a textbox </li> <li><strong>int</strong> - Rendered as a numeric-only textbox </li> <li><strong>float</strong> - Rendered as a numeric-only textbox </li> <li><strong>knowncolor</strong> - Rendered as a drop-down list </li> <li><strong>enum</strong> - Rendered as a drop-down list </li> </ul> <p>The following figure depicts how SharePoint render different types of public properties:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU5WJrl_q3RZo_140Aa-VasE_i69Avx9_gZPfogDUJjrBrmlTPPfaxbdiiQ8D_ICMVjheu__qRKLGoyksHJ_58PZA0IFMo0LeTSDpomTv5fvoTCzp1Id6gFDQ9ypk6Mvf6zl44q5wr6Dg/s1600-h/image%5B3%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/__zJylaorRD0/TZCC_DudJ9I/AAAAAAAAAQM/E1h9M43MRJM/image_thumb%5B1%5D.png?imgmax=800" width="438" height="516" /></a></p> <p>Code sample as shown below:</p> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p>[ToolboxItemAttribute(false)] <br />public class VisualWebPart1 : WebPart <br />{ <br />    private string _stringType = string.Empty; <br />    [Personalizable(), WebDisplayName("String Type"), WebBrowsable(true)] <br />    public string StringType <br />    { <br />        get { return _stringType; } <br />        set { _stringType = value; } <br />    }</p> <p>    private bool _boolType = false; <br />    [Personalizable(), WebDisplayName("Bool Type"), WebBrowsable(true)] <br />    public bool BoolType <br />    { <br />        get { return _boolType; } <br />        set { _boolType = value; } <br />    }</p> <p>    private DateTime _datetimeType; <br />    [Personalizable(), WebDisplayName("Datetime Type"), WebBrowsable(true)] <br />    public DateTime DatetimeType <br />    { <br />        get { return _datetimeType; } <br />        set { _datetimeType = value; } <br />    }</p> <p>    private int _intType = 0; <br />    [Personalizable(), WebDisplayName("Int Type"), WebBrowsable(true)] <br />    public int IntType <br />    { <br />        get { return _intType; } <br />        set { _intType = value; } <br />    }</p> <p>    private float _floatType = 0; <br />    [Personalizable(), WebDisplayName("Float Type"), WebBrowsable(true)] <br />    public float FloatType <br />    { <br />        get { return _floatType; } <br />        set { _floatType = value; } <br />    }</p> <p>    private KnownColor _knowncolor; <br />    [Personalizable(), WebDisplayName("KnownColor Type"), WebBrowsable(true)] <br />    public KnownColor Knowncolor <br />    { <br />        get { return _knowncolor; } <br />        set { _knowncolor = value; } <br />    }</p> <p>    public enum Days { Sat, Sun, Mon, Tue, Wed, Thu, Fri }; <br />    private Days _enumType; <br />    [Personalizable(), WebDisplayName("Enum Type"), WebBrowsable(true)] <br />    public Days EnumType <br />    { <br />        get { return _enumType; } <br />        set { _enumType = value; } <br />    } <br />}</p> </div> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com2tag:blogger.com,1999:blog-5560277921083269642.post-21078498826653070262011-03-27T11:49:00.001+08:002011-03-27T11:49:31.385+08:00Iterative Development Creates a Ton of Unwanted web.config Backup Files<p>Whenever SharePoint modifies the web.config file, it creates a backup copy with a BAK extension as shown in figure below:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdg8EGkgxVFtJ1BHT5XjjelchvoV45FhWPBAX2wuvt6hKGVg6VzUYqM8ag27dkxZU5b_y7Y7kc_BOhf-NFh3-lI-fK6OOtne9Z3aQkl-kn4pXwXsjK997HJPPXbXpsvpKO_ktQ4tih82c/s1600-h/image%5B3%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/__zJylaorRD0/TY6zxMhukcI/AAAAAAAAAP0/JnTfWN3Fa1U/image_thumb%5B1%5D.png?imgmax=800" width="424" height="541" /></a></p> <p>These backup files can be helpful on the occasion a previous version of the web.config is needed. However, when you deploy SharePoint assets using MS Visual Studio for iterative development, they can accumulate a ton of unwanted files. </p> <p>The following steps teach you how to run DOS command after each successful deployment will keep the web application IIS home directory much tidier.</p> <ul> <li>Select the SharePoint node, as shown in figure below: </li> </ul> <p><a href="http://lh4.ggpht.com/__zJylaorRD0/TY6zxruDjRI/AAAAAAAAAP4/XPp7nTidjnU/s1600-h/image%5B7%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/__zJylaorRD0/TY6zye69ZnI/AAAAAAAAAP8/K8YDLh3PBp0/image_thumb%5B3%5D.png?imgmax=800" width="594" height="400" /></a></p> <ul> <li>Type the following into the “Post-deployment Command Line” textbox: </li> </ul> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p>DEL C:\inetpub\wwwroot\wss\VirtualDirectories\[WebApplicationHomeDirectory]\*.bak</p> </div> <p>Replace <strong>[WebApplicationHomeDirectory]</strong> with the actual file system directory that IIS refers to as the web application’s home directory. </p> <ul> <li>Just below the <strong>Post-deployment Command Line</strong>, verify that the <strong>Default </strong>option is selected in the <strong>Active Deployment Configuration drop-down</strong>.</li> </ul> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-67209426790796613182011-03-24T17:16:00.001+08:002011-03-24T17:16:00.823+08:00Customise SharePoint v4 Master Page to Hide Recycle Bin and All Site Content Links<p>The following steps walk you through the process of making this common SharePoint customization:</p> <ul> <li>Create a custom master page <strong>SharePointMalaya.master</strong> from <strong>v4.master</strong>.<strong> </strong>For details information on how to create this master page, see <a href="http://sharepointmalaya.blogspot.com/2011/03/customise-sharepoint-v4-master-page-to.html">Customise SharePoint v4 Master Page to Add Footer</a>.</li> <li>Edit the <strong>CustomFooter.master</strong> file by clicking on the <strong>Edit File</strong> button.</li> <li>From the ribbon, click the <strong>Skewer Click</strong> button, as shown in Figure below. This enables you to see the CSS that is being applied to a specific object.</li> </ul> <p><a href="http://lh3.ggpht.com/__zJylaorRD0/TYsLp2jwymI/AAAAAAAAAO4/3cdGfdP8aOw/s1600-h/image%5B34%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDURiMTSkqEbbFBtemcPrcLGBXvUlWQwb2FC3u_kdk6IQCF6R1qKMijFH89b2fh5OAdV-tzr114A7rd34jzdGqqbeUpKT0BFuKRZd4jNCNd2iTIoep3Xy3cbs3t1CIQXHSiH3OqyHDBAw/?imgmax=800" width="401" height="207" /></a></p> <ul> <li>With <strong>Skewer Click</strong> selected, hover over the area near where the <strong>Recycle Bin </strong>and <strong>All Site Content </strong>links are located. Move your mouse around the area and you should see the name <strong>PlaceHolderQuickLaunchBottom</strong> appear faintly. </li> </ul> <p><a href="http://lh4.ggpht.com/__zJylaorRD0/TYsLrATYeuI/AAAAAAAAAPA/_j9cTjvix1w/s1600-h/image%5B32%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/__zJylaorRD0/TYsLsAiuPUI/AAAAAAAAAPE/bmIzmFFyYuk/image_thumb%5B18%5D.png?imgmax=800" width="193" height="344" /></a></p> <ul> <li>Select it and another window will open displaying a list of styles. Click the style called <strong>ul.s4-specialNav…</strong>, as shown in <br />figure below.</li> </ul> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwBcuQFqH3pOzfBpujA7VCG_JxnBDacdL2mpdiV7EcaXv35tECZRUd2xriVx_3MCAN2qGwkBzRMaGcX0xVD-eIzAM6h_CRDOWB_OQ5Yo32ysLD_e5QZwAUxRiLI7vwSMecA3OfLUP2cnM/s1600-h/image%5B33%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitMntVMjUawXCgNuBnkjQpFloX8t6JH4Ju8nMGUaW81VNXvi4gcFkOR8lgsggFdWTl960MP9cu59gHVQiR3PR6bMYv-vPn6zcWkHElIgsR4vGAWmDm5NMUjUyzoDbkPcEHwAcSIqFMRbM/?imgmax=800" width="278" height="409" /></a></p> <ul> <li>Before you can edit the CSS, you must first add a new panel to SPD. From the ribbon, click the <strong>Style tab </strong>and select the <strong>CSS Properties </strong>button.</li> <li>When the new panel opens, you’ll see the top section is called <strong>Applied Rules</strong>. The style you want to modify (<strong>.s4specialNavLinkList</strong>) should already be selected as shown in figure below.</li> </ul> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicQp4r7tf088DrHPu9cwVK4yEhZxEAqrn_KNMbYx7OqhOtRxgtJtMIkXo80oElKTcuR_LDzolUaEo3NyLjsc-2WtUGqI7fnVNy4iuD4aUoWneGeqqpAGTzZ31IZT6V7_UL0ka4yvWRISo/s1600-h/image%5B26%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/__zJylaorRD0/TYsLvYwYMoI/AAAAAAAAAPU/gKq32CJQQaA/image_thumb%5B12%5D.png?imgmax=800" width="794" height="324" /></a></p> <ul> <li>Right click the style and select <strong>New Style Copy</strong>.</li> </ul> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUl8CTU_uQD4UUEa_Mu6DsTF9GzFIcK1_I-VUMtc2S6743CgGEPVwkg0IqizheCskIZ-ntfYR_y1kzQk5ASxfJr_hxJCkcuccIELU9JBhrI-j-WJqqhZ-_xsmG0CGGVqDVzdZwlIiikwc/s1600-h/image%5B27%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/__zJylaorRD0/TYsLw7qFvKI/AAAAAAAAAPc/UR90g9lPPE8/image_thumb%5B13%5D.png?imgmax=800" width="387" height="390" /></a></p> <ul> <li>At the top of the <strong>New Style </strong>dialog shown in figure below, set the new style to be defined in the “<strong>Current page</strong>”. Be sure to check the box “<strong>Apply new style to document selection</strong>”. Then select the <strong>Layout </strong>category and set the “<strong>visibility</strong>” to “<strong>hidden</strong>”. Click <strong>OK</strong>.</li> </ul> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB3xkSAX84-bBHta2XP9o3AEzZn77g3h6F4S4bMjMyr2rJKqS8ZUNHrM36lzIwGOzMd043Lyt_NW8Ehi9JPrqEFmO6lCX9kP7GGzKxvUe33Tta_VSJFy7F5RHo_9BE7YjytbrWokpLwt8/s1600-h/image%5B31%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/__zJylaorRD0/TYsLyZ_bGJI/AAAAAAAAAPk/GngGOlCF0do/image_thumb%5B17%5D.png?imgmax=800" width="484" height="479" /></a></p> <ul> <li>Save the changes made to the master page.</li> <li>Now open your site in the web browser, you’ll see that a footer has been applied to your site, as shown below:</li> </ul> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7qf4qu0S0uenCA8l1ElHbhxMdbK3J_mWMVy0Fs2TYf_B4NfR5NcAmgsXo15P3_AgxXIoIZLk-fq_uT9L7YKYL5-x5dW8kJDFlvRQ1KpO7I9BE25Mow54nJyrVd7gxUhIu_eYXpADwmOk/s1600-h/image%5B30%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/__zJylaorRD0/TYsLz4e-xPI/AAAAAAAAAPs/kpua8b3yQts/image_thumb%5B16%5D.png?imgmax=800" width="790" height="327" /></a></p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-4754309648742310202011-03-24T16:41:00.001+08:002011-03-24T16:41:04.656+08:00Customise SharePoint v4 Master Page to Add Footer<p>The following are steps of creating a custom master page to add a footer by using <strong>SharePoint Designer 2010</strong>.</p> <ul> <li>Open your site in <strong>SharePoint Designer 2010 </strong>and click the <strong>Master Pages</strong> <strong>link</strong> in the <strong>Navigation </strong>pane. </li> <li>Right click <strong>v4.master</strong> and select <strong>Copy</strong>. </li> </ul> <p><a href="http://lh5.ggpht.com/__zJylaorRD0/TYsDhANpUnI/AAAAAAAAAOQ/lu7eyu5iqsM/s1600-h/image%5B24%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/__zJylaorRD0/TYsDiPSTZ5I/AAAAAAAAAOU/_hcD7N7Y7qU/image_thumb%5B12%5D.png?imgmax=800" width="479" height="507" /></a></p> <ul> <li>Right click and paste another copy of the file into the <strong>Master Pages gallery</strong>. </li> <li>From the <strong>Master Pages gallery</strong>, click next to the filename for the master page that was just <br />created. From the ribbon, click the <strong>Rename</strong> button. Rename the file <strong>SharePointMalayaFooter.master</strong>. </li> </ul> <p><a href="http://lh6.ggpht.com/__zJylaorRD0/TYsDi-i7XzI/AAAAAAAAAOY/fkIAqQOl750/s1600-h/image%5B33%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/__zJylaorRD0/TYsDj_TYgbI/AAAAAAAAAOc/UYjuNi4ovG8/image_thumb%5B19%5D.png?imgmax=800" width="599" height="424" /></a></p> <ul> <li>Select the file <strong>SharePointMalayaFooter.master</strong> and then, from the ribbon, click the <strong>Edit File</strong> button. </li> <li>Ensure that either the <strong>Split</strong> or <strong>Code</strong> view is showing. Near line 624, after <strong><SharePoint:DeveloperDashboard runat=“server”/></strong>, add the following code snippet: </li> </ul> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p><div class="s4-notdlg" style="clear: both; background-color:#FEAD30; padding: 10px;">&copy; Copyright 2011 SharePoint Malaya</div></p> </div> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnnU8m8SH2fRJGYEbBiMRWr7fmPIOBVxSOOH0KXuLfK-qFRAJMmsrYXpV7jWYE6jmbpnw80uOWE15aJXST7O3eVgN1OofoqWdUvlQjbeFMONgMsbY3xdKOHd6MHHLrhq4ycggBh9uZl_s/s1600-h/image%5B32%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJD8U4-l4NiHjG6v6qqRByLErp_55lYr27oKbwWyFC21R8AtcNE59cVoobMx1pYTqBBEsuRZwJPJPG4id68v5gocc8H2LRR-8b5h4rs5JCzeHWKIHTM46hYu_DFkzWp2OPmMAKIRrGR3M/?imgmax=800" width="600" height="444" /></a></p> <ul> <li>After you’ve made the change, save the fi le by clicking the <strong>Save</strong> icon in the upper left-hand corner of the screen. You will get a dialog that warns you that you are about to customize the file from the site definition. Click <strong>Yes</strong> to continue.</li> </ul> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg5-y-OlXMmeaMaEZXLycarcih2iUxHZJFWo4zItD_YEnzRvWHHIqJ44ubpA58AbuXI8vBSnfC7EhoeB5yIUCX8ZhEGZOPzKlJjHwGlkT9JnUGtnOQB0BIBB9-tDM08iT_3qyH6F60iZM/s1600-h/image%5B25%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVr9b7g27CU8XVv5MBmzK_28lJDIxTkYbGZy6V1UNhApILuRA4TP91vNKUL_3gaZ2co9Yde9I0n5BM_1ywvY18J3diw_eA-9tRoyO7gkjmVgv6HnycbOSTKnP3cFLf7GiKcPEH845Xpnc/?imgmax=800" width="463" height="163" /></a></p> <ul> <li>Click the <strong>Master Page</strong> <strong>link</strong> again from the <strong>Navigation</strong> pane on the left to return to the <strong>Master Pages gallery</strong>.</li> <li>To apply the changes to the site, select <strong>SharePointMalayaFooter.master</strong> and then, from the ribbon, click the <strong>Set as Default</strong> button.</li> <li>Now open your site in the web browser, you’ll see that a footer has been applied to your site, as shown below:</li> </ul> <p><a href="http://lh4.ggpht.com/__zJylaorRD0/TYsDnB4MzcI/AAAAAAAAAOw/qugEBSdrRvo/s1600-h/image%5B34%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGS-AiUwGhWNveIxfHum8hL7_p6rdiZjKDDrSWvFAMJW3_E2YDV0CnWKojqZnyaiL5s0ewQLzXdCwunu162TXTCoXYUhEAvW1g5o5JLYTs_ZKY3yrg_EoqCjaxde4L5_YPWolQZaYf6hE/?imgmax=800" width="744" height="495" /></a></p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com5tag:blogger.com,1999:blog-5560277921083269642.post-64174853656243975532011-03-12T22:21:00.000+08:002011-03-13T22:42:01.165+08:00SharePoint Designer 2010 Checking and Changing the Current User<p>One of the coolest feature of SharePoint Designer 2010 is the ability to check the user currently who logged in and to switch to a different user whenever you need to.</p> <p>Remember the old SharePoint 2007 where you need to first login to the site, and then only you can open it using SharePoint Designer. Let say, you might be logged in with an administrator account. If you wanted to test something as a different user, how would you do that? Yeah, you’ll need to close the site and browser, login using different username via browser and open the site using SharePoint Designer 2007. Mmmmm… well, with SharePoint 2010 you don’t need to do that anymore!</p> <p>To check the current user currently logged in, with open SharePoint Designer 2007, if you look in the bottom-left corner, you’ll see a tiny little person icon, as shown below:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiClzjTf3kBY1s8WUqzGxY7HLmSYl6DG5p2rZb7FlD-ig7IogHNurheH8IKCsFrXiYO55pA6NXfbjiGCWdwFUORJVo8NmBcC4xhRAV1vQ19saupk4I5Vdilvmp3ShYF08P91T60Q0Rx32E/s1600-h/image%5B3%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikWhd2lhVfPITf_S2nQUYsZN6xUzvX-aUn3zEIJij4WwEAiVYPgTRkmX_RP0dB8cH4lKzi-ZBCoXJENdrfXuoYUMHLLOT3h36PCQRqfy0c1173HX42W7qelOg46Alw8HKKJF7WPKyKUQI/?imgmax=800" width="238" height="370" /></a></p> <p>Hovering over the icon with your mouse shows the name of the user currently logged in.</p> <p>Clicking the icon allows you to log in with a different account.</p> <p><a href="http://lh6.ggpht.com/__zJylaorRD0/TXzXtUMUmGI/AAAAAAAAAOE/pCrYZ_xFSGs/s1600-h/image%5B4%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmAQLk528L8gHu1iDpTxSehYwLgQogfcvLcim7UTwWyJY831Sm62uYoXXHBN_cTCpSWGGRo96dPrz-_90pesEI-4Tt9LIbID1asFti_BKiBguznpBwfF3wTO2H_fotegiebqYeniT9htA/?imgmax=800" width="419" height="153" /></a></p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-89657922490262236612011-03-12T18:12:00.000+08:002011-03-12T18:12:00.533+08:00Visual Studio 2010 Service Pack 1 is Now Available<p>Yes, Visual Studio 2010 Service Pack 1 has been released this week. Don’t forget to download and install – get the download from here: <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=en">Microsoft Visual Studio 2010 Service Pack 1 (Installer)</a>.</p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-84142345510450101262011-03-04T19:45:00.000+08:002011-03-04T19:45:00.167+08:00Cumulative Updates for MOSS 2007, WSS 3.0, SharePoint 2010 has been released<p>Yesterday Microsoft released the Full Server Packages for February 2011 Cumulative Updates for MOSS 2007, WSS 3.0, SharePoint 2010. KB articles can be found here:</p> <ul> <li>KB <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;2475886">2475886</a> - WSS 3.0 </li> <li>KB <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;2475885">2475885</a> - MOSS 2007 </li> <li>KB <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;2475880">2475880</a> - SharePoint Foundation 2010 </li> <li>KB <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;2475878">2475878</a> - SharePoint Server 2010 </li> <li>KB <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;2475879">2475879</a> - SharePoint Server 2010 with Project Server</li> </ul> <p>February 2011 Cumulative Updates can be downloaded here:</p> <ul> <li><a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbln=en-us&kbnum=2475886">WSS 3.0 February 2011 CU</a></li> <li><a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbln=en-us&kbnum=2475885">MOSS 2007 February 2011 CU</a></li> <li><a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbln=en-us&kbnum=2475880">SharePoint Foundation 2010 February 2011 CU</a></li> <li><a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbln=en-us&kbnum=2475878">SharePoint Server 2010 February 2011 CU</a></li> <li><a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbln=en-us&kbnum=2475879">SharePoint Server 2010 with Project Server February 2011 CU</a></li> </ul> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-42902053360402851022011-03-04T19:25:00.000+08:002011-03-04T19:25:01.801+08:00SharePoint 2010 Development Platform Stack<p>Diagram below depicts how SharePoint Foundation is built on Microsoft .NET Framework 3.5, ASP.NET, and Internet Information Services (IIS). SharePoint is also built on SQL Server.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghOfg5UcP9uXsrvuNdV5j5weKNwCQtaqCIRxi9tFyaOl1b_guzixsXUGsXIxtbiX2TGuzoCC3mJXjJn45SrHeuP3Kl0y3xvwl75OsPDZL1JNcivbvx_aUB-FEuDPVqKuI1S3pRLEEbldE/s1600-h/SharePointDevelopmentStack%5B4%5D.gif"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SharePointDevelopmentStack" border="0" alt="SharePointDevelopmentStack" src="http://lh6.ggpht.com/__zJylaorRD0/TXDLzgCTUAI/AAAAAAAAANw/6qgv_yp6ktU/SharePointDevelopmentStack_thumb%5B2%5D.gif?imgmax=800" width="781" height="640" /></a></p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-56761904816593931072011-02-22T19:32:00.000+08:002011-02-22T19:32:02.307+08:00Visual Studio Productivity Tool–Latest Update Released<p>Today Microsoft has released latest update to <a href="http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/">Visual Studio Productivity Tools</a>. This update includes many improvements, if you like to know more about it, read the following blogs:</p> <ul> <li><a href="http://blogs.msdn.com/b/visualstudio/archive/2010/06/10/document-well-2010-plus.aspx">Document Well 2010 Plus</a></li> <li><a href="http://blogs.msdn.com/b/visualstudio/archive/2010/06/22/what-s-next-for-the-productivity-power-tools.aspx">Searchable Add Reference Dialog</a></li> <li><a href="http://blogs.msdn.com/b/visualstudio/archive/2010/08/03/quick-access-extension.aspx">Quick Access Extension</a></li> <li><a href="http://blogs.msdn.com/b/kirillosenkov/archive/2010/06/07/copy-code-in-html-format-with-visual-studio-2010.aspx">Copy Code in HTML format</a></li> </ul> <p>Enjoy it!!</p> <p><a href="http://www.microsoft.com/visualstudio/en-us/">Visual Studio</a> is SIMPLY THE BEST!!!</p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-8333904566627805332011-02-19T09:02:00.000+08:002011-02-19T09:02:00.893+08:00Supported Paths In-Place Upgrade<p>Simple rule! Take a look at this diagram:</p> <p><a href="http://lh4.ggpht.com/__zJylaorRD0/TV8WHMhIXYI/AAAAAAAAANY/GK-hZmMK9Y0/s1600-h/SupportedPathsInPlace%5B3%5D.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SupportedPathsInPlace" border="0" alt="SupportedPathsInPlace" src="http://lh4.ggpht.com/__zJylaorRD0/TV8WH4TZmRI/AAAAAAAAANc/l-XQiuH8CS0/SupportedPathsInPlace_thumb%5B1%5D.jpg?imgmax=800" width="777" height="513" /></a></p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-47565939468967206742011-02-19T08:40:00.000+08:002011-02-19T08:40:00.393+08:00Patterns & Practices SharePoint 2010 & 2007 Guidance Resources<p>Microsoft has released Patterns & Practices on SharePoint Guidance that are designed to help solution developers and architects make the right decisions and follow proven practices when building applications for SharePoint. The following are useful resources that you might want to explore:</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/ff650022.aspx">MSDN SharePoint Guidance</a></li> <li><a href="http://spg.codeplex.com/">CodePlex SharePoint Guidance</a></li> <li><a href="http://channel9.msdn.com/posts/akMSFT/Walkthrough-of-the-Contoso-Reference-Implementation-p--p-Developing-SharePoint-Applications-guidance/">Walkthrough of the Contoso Reference Implementation</a></li> <li><a href="http://channel9.msdn.com/posts/akMSFT/Setting-up-the-Contoso-RI-p--p-Developing-SharePoint-Applications-guidance/">Setting up the Contoso RI</a></li> <li><a href="http://channel9.msdn.com/posts/akMSFT/How-to-use-the-configuration-component-p--p-Developing-SharePoint-Applications-guidance/">How to use the configuration component?</a></li> <li><a href="http://channel9.msdn.com/posts/akMSFT/How-to-use-the-logging-components-p--p-Developing-SharePoint-Applications-guidance/">How to use the logging components?</a></li> <li><a href="http://channel9.msdn.com/posts/akMSFT/How-to-use-the-SharePoint-Service-Locator-p--p-Developing-SharePoint-Applications-guidance/">How to use the SharePoint Service Locator? </a></li> </ul> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-39391268287412558452011-02-14T09:53:00.000+08:002011-02-14T09:53:01.070+08:00SharePoint 2010 Official Site and Useful Blogs Worth Checking Out<p>A great starting place to understand more about SharePoint would be the <strong>MSDN SharePoint Developer Center</strong>:</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/sharepoint/default.aspx">http://msdn.microsoft.com/en-us/sharepoint/default.aspx</a></li> </ul> <p>You may also want to check out the <strong>MSDN Office Developer Center</strong>:</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/office/default.aspx">http://msdn.microsoft.com/en-us/office/default.aspx</a></li> </ul> <p>Also, <strong>Channel 9</strong> offers a number of training kits that you can download and walk through, for both SharePoint and other Microsoft technologies. The Channel 9 Learning Center is located here:</p> <ul> <li><a href="http://channel9.msdn.com/learn/">http://channel9.msdn.com/learn/</a></li> </ul> <p>With just these three sites, you’ll find a ton of developer resources.</p> <p>Lastly, following are a few blogs worth checking out. You’ll certainly find more, but these have proven to be useful and informative over the years:</p> <ul> <li>SharePoint Team at <a href="http://blogs.msdn.com/sharepoint">http://blogs.msdn.com/sharepoint</a></li> <li>Andrew Connell at <a href="http://www.andrewconnell.com/blog">www.andrewconnell.com/blog</a></li> <li>Arpan Shah at <a href="http://blogs.msdn.com/arpans">http://blogs.msdn.com/arpans</a></li> <li>Paul Stubb at <a href="http://blogs.msdn.com/pstubbs">http://blogs.msdn.com/pstubbs</a></li> <li>Paul Andrew at <a href="http://blogs.msdn.com/pandrew">http://blogs.msdn.com/pandrew</a></li> <li>Scot Hillier at <a href="http://www.shillier.com/default.aspx">www.shillier.com/default.aspx</a></li> <li>Sahil Malik at <a href="http://blah.winsmarts.com">http://blah.winsmarts.com</a></li> <li>Wouter van Vugt at <a href="http://blogs.code-counsel.net/Wouter/default.aspx">http://blogs.code-counsel.net/Wouter/default.aspx</a></li> <li>Todd Baginski at <a href="http://www.toddbaginski.com/blog">www.toddbaginski.com/blog</a></li> <li>Tim Heuer at <a href="http://timheuer.com/blog">http://timheuer.com/blog</a></li> <li>Steve Fox at <a href="http://blogs.msdn.com/steve_fox">http://blogs.msdn.com/steve_fox</a></li> </ul> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-25112782292900990102011-02-14T09:44:00.000+08:002011-02-14T09:44:00.826+08:00SharePoint 2007 Common Customizations and Recommendations When Upgrading to SharePoint 2010<p>Because of the downtime issues, in-place upgrades are better suited for small environments. In larger environments, the downtime needed to do an in-place upgrade may be too long. In-place upgrades may also not be suited for environments with significant custom code or other customizations. One of the benefits of an in-place upgrade is that the customizations in SharePoint 2007 are maintained. However, in order for your upgrade to be successful, your custom code must run in both SharePoint 2007 and SharePoint 2010. </p> <p>Table below provides list of common customizations in SharePoint 2007 and recommendations on how to deal with them when upgrading to SharePoint 2010:</p> <table border="1" cellspacing="0" cellpadding="2" width="896"><tbody> <tr> <td valign="top" width="168"> <p align="center"><strong>Customization</strong></p> </td> <td valign="top" width="332"> <p align="center"><strong>Good Choice</strong></p> </td> <td valign="top" width="394"> <p align="center"><strong>Better Choice</strong></p> </td> </tr> <tr> <td valign="top" width="168">Custom Web Parts</td> <td valign="top" width="332"> <p>Probably work out of the box with SharePoint 2010</p> </td> <td valign="top" width="394"> <p>Test on sample server, plan to rewrite for SharePoint 2010</p> </td> </tr> <tr> <td valign="top" width="168"> <p>Custom event handlers</p> </td> <td valign="top" width="332"> <p>Probably work out of the box with SharePoint 2010</p> </td> <td valign="top" width="394"> <p>Test on sample server, plan to rewrite for SharePoint 2010</p> </td> </tr> <tr> <td valign="top" width="168"> <p>Custom Site template</p> </td> <td valign="top" width="332"> <p>Create a site with the Custom Site template before upgrade</p> </td> <td valign="top" width="394"> <p>Recreate in SharePoint 2010, preferably as a Solution package and Feature</p> </td> </tr> <tr> <td valign="top" width="168"> <p>Custom site definition</p> </td> <td valign="top" width="332">Create UDF file for upgrade</td> <td valign="top" width="394"> <p>Migrate to an out-of-the-box site template and deploy customizations as a Solution package and Feature</p> </td> </tr> <tr> <td valign="top" width="168"> <p>Customized (unghosted) <br />pages</p> </td> <td valign="top" width="332">Reset to site definition</td> <td valign="top" width="394"> <p>Reset to site definition, and reapply customizations</p> </td> </tr> <tr> <td valign="top" width="168"> <p>Custom code or pages in /_layouts</p> </td> <td valign="top" width="332"> <p>Probably work out of the box with SharePoint 2010</p> </td> <td valign="top" width="394"> <p>Test on sample server, plan to rewrite for SharePoint 2010</p> </td> </tr> </tbody></table> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-68100177598763628782011-02-10T21:56:00.000+08:002011-02-10T22:06:21.812+08:00MSDN Virtual Lab: Introduction to Microsoft ASP.NET Web Forms 4.0<p>Today <strong>MSDN</strong> has released a newest <a href="https://cmg.vlabcenter.com/default.aspx?moduleid=0695c157-885a-4041-8928-bed6c22d8ed8">Virtual Lab: Introduction to Microsoft ASP.NET Web Forms 4.0</a>. Enjoy it!</p> <h4>Objectives</h4> <p>After completing this lab, you will be better able to:</p> <ul> <li>Take advantage of the new ASP.NET Project Templates </li> <li>Control server control ClientIds </li> <li>Enable bi-directional routing support </li> <li>Control the View State at application and page level </li> </ul> <h4>Scenario</h4> <p>ASP.NET 4 Web Forms provides enhancements in targeted areas and includes some new features. This Lab is also available online at <a href="http://channel9.msdn.com/learn">http://channel9.msdn.com/learn</a> and covers the following features:</p> <h4>New ASP.NET Project Templates</h4> <p>ASP.NET 4 Web Forms includes updated templates for creating new web applications and web sites. These templates include common functionality already implemented, which helps reducing the development time and provides guidance on best practices for building ASP.NET 4 Web applications.</p> <h4>Client IDs</h4> <p>Developers can now manage control IDs that affect rendered client IDs. The Control class now provides a new property called ClientIDMode that allows you to specify what behavior you want the runtime to take when determining whether or not to refactor the client ID upon rendering. This removes the previous bloat in the client ID.</p> <h4>URL Routing</h4> <p>ASP.NET 4 Web Forms introduces the new PageRouteHandler class that integrates URL Routing with Web Form Pages. URL routing in ASP.NET enables you to use URLs that do not have to map to specific files in a Web site. Because the URL does not have to map to a file, you can use URLs in a Web application that are descriptive of the user's action and are more easily understood by users and search engines. In URL routing, you define URL patterns that contain placeholders for values that are used when you handle URL requests. At run time, the pieces of the URL that follow the application name are parsed into discrete values, based on a URL pattern that you have defined.</p> <h4>View State</h4> <p>ASP.NET 4 Web Forms provides a more granular control over the View State. Developers can now disable the View State on a Page and enable it on specific server controls, and also disable it on a control an enable it on its childs.</p> <h4>Estimated time to complete</h4> <p>90 min</p> <h4>Computers used in this Lab</h4> <ul> <li>VS2010Labs-PC </li> <li>The password for the Administrator account on all computers in this lab is: <a href="mailto:pass@word1">pass@word1</a> </li> </ul> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-68327984305013794882011-02-08T10:35:00.000+08:002011-02-10T22:10:54.606+08:00Getting SharePoint Web Application URL Using SPAlternateUrl<p>By using <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spalternateurl.aspx">SPAlternateURL</a> object, you can get the URL or SharePoint 2010 Web Application since the alternate access mappings are associated with a Web Application. Sample code is provided below:</p> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p>public static string GetWebAppURL(SPWebApplication oWebApp, SPUrlZone urlZone) <br />{ <br />    string retVal = string.Empty; <br />    try <br />    { <br />        foreach (SPAlternateUrl altUrl in oWebApp.AlternateUrls) <br />        { <br />            if (altUrl.UrlZone == urlZone) <br />            { <br />                retVal = altUrl.Uri.ToString(); <br />                break; <br />            } <br />        } <br />    } <br />    catch (Exception ex) <br />    { <br />        throw ex; <br />    } <br />    return retVal; <br />}</p> <p>public static string GetWebAppURL(SPSite oSite, SPUrlZone urlZone) <br />{ <br />    string retVal = string.Empty; <br />    SPWebApplication oWebApp = null; <br />    try <br />    { <br />        if ((oWebApp = oSite.WebApplication) != null) <br />            retVal = GetWebAppURL(oWebApp, urlZone); <br />    } <br />    catch (Exception ex) <br />    { <br />        throw ex; <br />    } <br />    return retVal; <br />}</p> <p>public static string GetWebAppURL(SPWeb oWeb, SPUrlZone urlZone) <br />{ <br />    string retVal = string.Empty; <br />    SPWebApplication oWebApp = null; <br />    try <br />    { <br />        if(( oWebApp = oWeb.Site.WebApplication)!=null) <br />            retVal = GetWebAppURL(oWebApp, urlZone); <br />    } <br />    catch (Exception ex) <br />    { <br />        throw ex; <br />    } <br />    return retVal; <br />}</p> </div> <p>In order to call these functions, you need to pass either SPWebApplication, SPSite or SPWeb object and specify the SPUrlZone enumeration which has the following originating zone of a request:</p> <ul> <li>Default - Specifies the default zone used for requests unless another zone is specified.</li> <li>Intranet - Specifies an intranet zone.</li> <li>Internet - Specifies an Internet zone.</li> <li>Custom - Specifies a custom zone.</li> <li>Extranet - Specifies an extranet zone.</li> </ul> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-39704368675357666132011-02-07T13:36:00.000+08:002011-02-07T13:36:01.048+08:00How to Show Favicon In SharePoint 2010<p><strong>Favicons</strong> are the little shortcut icons that appear in most modern browsers next to bookmarks, as well as in the address bar next to the site’s URL and on browser tabs - check out Wikipedia about <a href="http://en.wikipedia.org/wiki/Favicon">Favicon</a>.</p> <p>SharePoint 2010 makes it very easy to add a favicon to custom master pages using the following code: </p> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p><SharePoint:SPShortcutIcon runat=”server” IconUrl=”/Style Library/Images/SPMalayaFavIcon.ico”/> </p> </div> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjAD2xjK2Cql7AiYQA1pcRJOYf3qPX-FPGxXc55bzx71m1qKeO_poGnU6DiUYRM5ZttmNY7l8Hd_tsFSBHP7MnJ5_EEdGfYJi8tjB4IYicbkPSOs89tiinnlQQCy19nOv-AD-QiJEYX_A/s1600-h/Favicon%5B4%5D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Favicon" border="0" alt="Favicon" src="http://lh6.ggpht.com/__zJylaorRD0/TU-Elwjbe2I/AAAAAAAAANU/xVCZmnnDfss/Favicon_thumb%5B2%5D.png?imgmax=800" width="679" height="339" /></a></p> <p>Please note that when testing favicons Internet Explorer, if you are having trouble seeing a new favicon and you are certain that the code and the image are set up correctly, it may help to clear your browser cache, make a new bookmark, or even close and <br />reopen the browser.</p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0tag:blogger.com,1999:blog-5560277921083269642.post-50359933104968296232011-02-07T12:17:00.000+08:002011-02-07T12:18:22.516+08:00Hiding the Name.dll ActiveX Control<p>If you are working on a public-facing Internet site, you should be aware that SharePoint may show a particularly annoying message at the top of Internet Explorer like shown below (<strong><em>This website wants to run the following add-on: ‘Name ActiveX Control’ from ‘Microsoft Corporation’: If you trust the website and the add-on and want to allow it to run, click here…</em></strong>)</p> <p><a href="http://lh5.ggpht.com/__zJylaorRD0/TU9x-oXjDKI/AAAAAAAAANI/4LqAgEDoqmI/s1600-h/NameDll%5B3%5D.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="NameDll" border="0" alt="NameDll" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvbGSVh57SgPb8MFpPJNRMfDktKrGxgNlysJrcmUZPtxYCzQFftUvkAfrtMFi0QxmZRtBlsiPtKK2Mp7ps2aIJuoBxFYNYMT2mj_vGW2HRgTDa2wuB6pBN4ZNWI6oAHlwtNn2xsw1sb6o/?imgmax=800" width="856" height="40" /></a></p> <p>The message asks the user to run the <strong>Name.dll ActiveX Control </strong>add-on because the users don’t the SharePoint Server added to their trusted sites list. This control enables presence information to be displayed for authenticated users in SharePoint, and typically shows their availability in external <strong>Instant Messaging</strong> programs from inside SharePoint. Since anonymous users don’t really need this functionality you can turn off this message by using one of the following method:</p> <ul> <li>In SharePoint 2010 the message can be turned off from <strong>Central Administration</strong> –> <strong>Manage Web Applications</strong> –> <strong>General Settings</strong>. Simply set <strong>Enable the Person Names Smart Tag and Online Status for Members</strong> to <strong>No</strong>. This will turn off the presence information and remove the ActiveX message for the entire web application. </li> <li>Alternatively you can you can disable the message and functionality from a custom master page. Simply add the following code to your master page: </li> </ul> <div style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 10px; padding-left: 5px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"> <p><script type=”text/javascript”> <br />    function ProcessImn(){} <br />    function ProcessImnMarkers(){} <br /></script></p> </div> <p>This JavaScript code overrides the functions in SharePoint that cause this ActiveX message.</p> Mohd Sukrihttp://www.blogger.com/profile/06552022433859170641noreply@blogger.com0