<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CU4DQHs9fip7ImA9WhBaFEw.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922</id><updated>2013-05-24T09:46:11.566-07:00</updated><category term="C#" /><category term="JQuery" /><category term="Mobile" /><category term="MVC" /><category term="SQL" /><category term="OAuth" /><category term="WCF" /><category term="IoC" /><category term="REST" /><category term="Asp.Net" /><category term="OData" /><category term="Sharepoint" /><category term="Fiddler" /><category term="Server" /><category term="About Me" /><category term="Patterns" /><category term="Security" /><category term="Android" /><category term="PhoneGap" /><category term="Entity Framework" /><category term="WEB API" /><category term="Testing" /><title>Aspiring Architect</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://pratapreddypilaka.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>88</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/AspiringArchitect" /><feedburner:info uri="aspiringarchitect" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0MHRX89eSp7ImA9WhBVFUk.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-6562188761670938997</id><published>2013-04-19T23:17:00.001-07:00</published><updated>2013-04-21T03:50:34.161-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-21T03:50:34.161-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Feature Stapling in Sharepoint</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;b&gt;Feature Stapling&lt;/b&gt; is a concept using which&amp;nbsp;a specific feature will be stappled to site template.&lt;br /&gt;
&lt;h4 style="text-align: left;"&gt;
What we gona acheive with it?&lt;/h4&gt;
There will be scenario where certain resource has to be populated to every site collection that was / will be&amp;nbsp;created on a farm. &lt;br /&gt;
&lt;br /&gt;
Eg : I am dealing a client who is a owning a chemical lab. He want complete list of "Elements and their Atomic weights" to be present in every site that was already created, and any site that will be created in future. &lt;br /&gt;
&lt;br /&gt;
In this scenario, Feature stappling will be used. &lt;br /&gt;
Lets see how to demonstrate it.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
I have created a sharepoint project in which there are 2 features.&lt;br /&gt;
&lt;strong&gt;1. Stapled Feature&lt;/strong&gt; - The feature taking care of creation of the Fields, a Content type and a List from that specific Conetent Type.&lt;br /&gt;
&lt;strong&gt;2. Stapling Feature&lt;/strong&gt; - The feature which will staple the "Stappled Feature" to specific Site template.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-ega4ZvQfAg4/UXIkwnWniAI/AAAAAAAADDE/XnKY2ihUS9A/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-ega4ZvQfAg4/UXIkwnWniAI/AAAAAAAADDE/XnKY2ihUS9A/s400/1.png" width="308" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
With Feature #1 : &lt;span style="background-color: yellow;"&gt;Stappled Feature&lt;/span&gt; (Site Scoped), LstContentType will be added to&amp;nbsp;a site and a list called StapledList was getting created with default data i intended to create. &lt;br /&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-tE3J67yqREg/UXInr_8sIcI/AAAAAAAADDc/k4_Pn6nxlq4/s1600/4.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="48" src="http://2.bp.blogspot.com/-tE3J67yqREg/UXInr_8sIcI/AAAAAAAADDc/k4_Pn6nxlq4/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Stappled Feature Deployed and Activated&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-yuxPMe3Nzl8/UXIm57-cD3I/AAAAAAAADDM/qrwXq6-m0kw/s1600/3.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="336" src="http://1.bp.blogspot.com/-yuxPMe3Nzl8/UXIm57-cD3I/AAAAAAAADDM/qrwXq6-m0kw/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;LstContentType&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-RKEQe6F4nUo/UXInJDIKLTI/AAAAAAAADDU/5BYvf38e6Kc/s1600/2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="296" src="http://1.bp.blogspot.com/-RKEQe6F4nUo/UXInJDIKLTI/AAAAAAAADDU/5BYvf38e6Kc/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;StappledList&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Add a element to project and i names it "StaplingElement". Modify the elements.xml under StaplingElement and add the below XML tag to associate Stapled Feature to site template.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;tt&gt;&amp;lt;featuresitetemplateassociation id="934cb12e-f397-41ff-be5a-7d32a085aff0" templatename="STS#0"&amp;gt;&lt;/tt&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-GyyvFGxd5lA/UXIs-IMiS8I/AAAAAAAADDk/7mzkDRo1dGc/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://1.bp.blogspot.com/-GyyvFGxd5lA/UXIs-IMiS8I/AAAAAAAADDk/7mzkDRo1dGc/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now, create second feature #2 Stappling Feature (Farm Scoped), and&amp;nbsp;add the Stappling Element.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-FNbEb88xyGQ/UXIuBGQFHQI/AAAAAAAADDs/Nke7LIKcVw4/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="272" src="http://1.bp.blogspot.com/-FNbEb88xyGQ/UXIuBGQFHQI/AAAAAAAADDs/Nke7LIKcVw4/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Deploy the solution (WSP). &lt;br /&gt;
Go to &lt;strong&gt;Central Admin&lt;/strong&gt;&amp;nbsp;=&amp;gt; &lt;strong&gt;System Settings&lt;/strong&gt; =&amp;gt; &lt;strong&gt;Manage Farm Features =&amp;gt;&amp;nbsp;&lt;/strong&gt;activate Stapling Feature.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-gnH0UPiWUwg/UXIvl9AcA4I/AAAAAAAADD0/T2yZK3yjVwE/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="210" src="http://1.bp.blogspot.com/-gnH0UPiWUwg/UXIvl9AcA4I/AAAAAAAADD0/T2yZK3yjVwE/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now, create a new Site Collection under a Existing&amp;nbsp; / New Webapplication using &lt;strong&gt;"Team Site"&lt;/strong&gt; template.&lt;br /&gt;
&lt;br /&gt;
The &lt;strong&gt;"#1 Stappled Feature"&lt;/strong&gt;&amp;nbsp;will be automatically avaliable in new site colection and will be activted. Thus all the above Fields, Content Type, &amp;nbsp;List and its data will be automatically created by default.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-zcSoNxKqPzs/UXIwluYbtMI/AAAAAAAADD8/0_hAzn_UcUg/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="272" src="http://4.bp.blogspot.com/-zcSoNxKqPzs/UXIwluYbtMI/AAAAAAAADD8/0_hAzn_UcUg/s640/8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h4 style="text-align: left;"&gt;
How Feature stappling will effect the existing sites? &lt;/h4&gt;
#1 Stappled feature will be added to exiting sites, but we need to enable the feature in all the existing sites using powershell or manually.&lt;br /&gt;
&lt;br /&gt;
Many of the developers might think different solutions like &lt;strong&gt;Custom Site Template&lt;/strong&gt;, &lt;strong&gt;Web Provisioning&lt;/strong&gt; or &lt;strong&gt;Seperate WSP with new feature &lt;/strong&gt;, instead of &lt;strong&gt;Feature Stapling&lt;/strong&gt;. But each solution has a unique scenario which we will discuss the comaprision in next post.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: yellow;"&gt;&lt;strong&gt;Code Smaple: &lt;/strong&gt;Downlaod&lt;strong&gt; &lt;a href="https://skydrive.live.com/?cid=56F6D80369352266&amp;amp;id=56F6D80369352266%21103" target="_blank"&gt;Feature stapling.zip&lt;/a&gt; &lt;/strong&gt;from skydrive folder.&lt;/span&gt;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/XIHB8NjZrKU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/6562188761670938997/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/04/feature-stapling-in-sharepoint.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/6562188761670938997?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/6562188761670938997?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/XIHB8NjZrKU/feature-stapling-in-sharepoint.html" title="Feature Stapling in Sharepoint" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-ega4ZvQfAg4/UXIkwnWniAI/AAAAAAAADDE/XnKY2ihUS9A/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/04/feature-stapling-in-sharepoint.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04CQ387cSp7ImA9WhBXGU8.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-4987313368311505993</id><published>2013-04-01T19:40:00.000-07:00</published><updated>2013-04-02T12:12:42.109-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-02T12:12:42.109-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JQuery" /><category scheme="http://www.blogger.com/atom/ns#" term="Mobile" /><category scheme="http://www.blogger.com/atom/ns#" term="PhoneGap" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Demo of PhoneGap on an Android</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;In earlier post we have seen "&lt;a href="http://pratapreddypilaka.blogspot.co.nz/2013/03/introduction-to-phonegap.html"&gt;Basics of PhoneGap&lt;/a&gt;". In this post we will see how to transform simple web application (Html 5, Css3, Javascript) into a native android App using PhoneGap.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-h-rV_KRGCns/UVY_U9feTII/AAAAAAAADAQ/GN7UN3FgJmA/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="162" src="http://4.bp.blogspot.com/-h-rV_KRGCns/UVY_U9feTII/AAAAAAAADAQ/GN7UN3FgJmA/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
First i have a simple web application to show the current location based on your devices Geological position. It was written in simple Html 5, Css 3, and Javascript.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-2RS-XVAnPWA/UVY_dPOIFdI/AAAAAAAADAY/rurmbFZGI94/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/-2RS-XVAnPWA/UVY_dPOIFdI/AAAAAAAADAY/rurmbFZGI94/s640/3.png" width="514" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now i want this to convert into Native App for android. As we are not using PhoneGap Cloud services, we need to use the PhoneGap generic code and will try to transform this simple web form to a Native Android App.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1: &lt;/b&gt;Download Eclipse IDE, as we decided to go with Android. Then install Android SDK. Then install ADT package.&lt;br /&gt;
&lt;br /&gt;
As i have been doing Android development also lately, i have everything installed on my Mac.&lt;br /&gt;
If its a fresh install for you try following the steps mentioned &lt;a href="http://docs.phonegap.com/en/2.5.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android"&gt;here.&lt;/a&gt;&amp;nbsp;Perform Step 2 only.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2: &lt;/b&gt;By this step you would have installed the required software and downloaded the Code sample from PhoneGap.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-cFQx6BNSv6w/UVZEyt6xR4I/AAAAAAAADAo/Jz8fXEPM_04/s1600/4.png.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" src="http://4.bp.blogspot.com/-cFQx6BNSv6w/UVZEyt6xR4I/AAAAAAAADAo/Jz8fXEPM_04/s640/4.png.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Step 3:&lt;/b&gt;&amp;nbsp;Open Eclipse. Click on Project and Choose "Android Application Form Existing Code Base".&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-4s9-33UNn2Y/UVZFqDOANbI/AAAAAAAADAw/__2BHfDcJgE/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="620" src="http://3.bp.blogspot.com/-4s9-33UNn2Y/UVZFqDOANbI/AAAAAAAADAw/__2BHfDcJgE/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Browse till example folder inside android folder. Rename the App as per your requirement. Check the option to copy to your workspace. This will create a copy of your own version for further modification to host your own app.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-yuVD8LcRDWk/UVZGIkiY-BI/AAAAAAAADA4/2r3HgOe3pPQ/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="578" src="http://1.bp.blogspot.com/-yuVD8LcRDWk/UVZGIkiY-BI/AAAAAAAADA4/2r3HgOe3pPQ/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Click Finish and the project will be opened in eclispse.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 4: &lt;/b&gt;Once the Project is loaded, as we check "Copy project into workspace", a copy of code will be copied to the workspace you selected, typically it will be "c:/users/xxxx/documents/workspace" in case of windows. "//xxxxx/documents/workspace" incase of Mac.&lt;br /&gt;
Now, go to WWW folder of the workspace copy. Delete all the files inside it and paste your Code files (Html 5 + Css 3 + Java scripts).&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-B1MMtlE0waE/UVZLQ1DAImI/AAAAAAAADBA/PjfxM7spGRE/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-B1MMtlE0waE/UVZLQ1DAImI/AAAAAAAADBA/PjfxM7spGRE/s400/8.png" width="310" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Step 5: &lt;/b&gt;&amp;nbsp;Go to res --&amp;gt; values --&amp;gt; string.xml and rename the App. I named it "Where Am I".&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-P8tPK4WhrHw/UVZL1_aHEYI/AAAAAAAADBI/NsysMfG6CA0/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="332" src="http://4.bp.blogspot.com/-P8tPK4WhrHw/UVZL1_aHEYI/AAAAAAAADBI/NsysMfG6CA0/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Result: &lt;/b&gt;We are all set and connect your android phone to laptop. and click on the Run button (Big Green button with &amp;gt; symbol.)&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;These are the snapshots from my Samsung Galaxy S3, Android Device:&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-Jf1kd5h3-p4/UVZPyChK3LI/AAAAAAAADBQ/FoH47llJSjc/s1600/Screenshot_2013-03-30-15-26-22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/-Jf1kd5h3-p4/UVZPyChK3LI/AAAAAAAADBQ/FoH47llJSjc/s640/Screenshot_2013-03-30-15-26-22.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-hJbBbzcj4PI/UVZP6div6lI/AAAAAAAADBY/Wbx84umWL-4/s1600/Screenshot_2013-03-30-15-27-33.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-hJbBbzcj4PI/UVZP6div6lI/AAAAAAAADBY/Wbx84umWL-4/s640/Screenshot_2013-03-30-15-27-33.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-gzYQZvrruH0/UVZP_WkFfnI/AAAAAAAADBg/-3BXPD4X3ao/s1600/Screenshot_2013-03-30-15-28-44.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-gzYQZvrruH0/UVZP_WkFfnI/AAAAAAAADBg/-3BXPD4X3ao/s640/Screenshot_2013-03-30-15-28-44.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
We will see more and more information on PhoneGap in upcoming posts.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/N7VVozyRsMQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/4987313368311505993/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/03/demo-of-phonegap-on-android.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/4987313368311505993?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/4987313368311505993?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/N7VVozyRsMQ/demo-of-phonegap-on-android.html" title="Demo of PhoneGap on an Android" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-h-rV_KRGCns/UVY_U9feTII/AAAAAAAADAQ/GN7UN3FgJmA/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/03/demo-of-phonegap-on-android.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIHQn07fCp7ImA9WhBXGE0.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-6728691266465956573</id><published>2013-04-01T18:05:00.000-07:00</published><updated>2013-04-01T01:22:13.304-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-01T01:22:13.304-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JQuery" /><category scheme="http://www.blogger.com/atom/ns#" term="Mobile" /><category scheme="http://www.blogger.com/atom/ns#" term="PhoneGap" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Introduction to PhoneGap</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
What is &lt;b&gt;PhoneGap&lt;/b&gt;?&lt;br /&gt;
With increasing demand of Application access on Portable devices like Mobiles and Tablets, the Application development has been divided into two streams.&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;span style="background-color: yellow;"&gt;Web Applications&lt;/span&gt; and &lt;span style="background-color: yellow;"&gt;Apps&lt;/span&gt;&amp;nbsp;&lt;/h3&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-hJx1Oey_0JM/UVY0eBQLmcI/AAAAAAAADAA/6RjzRk0XSx4/s1600/phonegap.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="230" src="http://2.bp.blogspot.com/-hJx1Oey_0JM/UVY0eBQLmcI/AAAAAAAADAA/6RjzRk0XSx4/s400/phonegap.jpeg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
Well, there are pros and cons of both the approaches.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;h3 style="text-align: left;"&gt;
&lt;b&gt;Web Applications:&lt;/b&gt;&lt;/h3&gt;
&lt;b&gt;Pro: &lt;/b&gt;One codebase for any device. Platform Independent.&lt;br /&gt;
&lt;b&gt;Con: &lt;/b&gt;Web applications will not have any control on Mobile infrastructure like Camera, Storage, Geo-Location, Contacts etc.&lt;br /&gt;
&lt;h3 style="text-align: left;"&gt;
Apps:&amp;nbsp;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;b&gt;Pro: &lt;/b&gt;Full Access to Mobile Infrastructure&amp;nbsp;like Camera, Storage, Geo-Location, Contacts, Connections etc.&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Cons: &lt;/b&gt;Separate SDK for each device. So, multiple code base. So, require multiple technology expertise.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;PHONEGAP &lt;/b&gt;is the technology which combines best of both the worlds.&lt;/div&gt;
&lt;div&gt;
Means, it will take the codebase (Html5, Css3, Javascript Libraries) and will create a Build based on target operating system. Thus converting the Web based code into Native App.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-hv3xGVD-HDE/UVY3f0478ZI/AAAAAAAADAI/7zbD6HjLM0k/s1600/Build-Diagram-3-Preview.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="392" src="http://4.bp.blogspot.com/-hv3xGVD-HDE/UVY3f0478ZI/AAAAAAAADAI/7zbD6HjLM0k/s640/Build-Diagram-3-Preview.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style="text-align: left;"&gt;
&lt;b&gt;HOW:&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
Build your app using Html 5, Css3 and Javascript libraries. Host it in Cloud and hire PhoneGap services. Thats it, they will take care of creating PhoneGap builds based on the requesting device OS.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style="text-align: left;"&gt;
WHATS IN IT FOR YOU:&lt;/h3&gt;
&lt;div&gt;
You don't need separate &amp;nbsp;technology experts. One Code base and One expertise to target any Native Apps for any platform / OS.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Lets do a Demo on using PhoneGap for android using regular web application, in next post&lt;br /&gt;
&lt;h3 class="post-title entry-title" style="background-color: #fff9ee; color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 24px; margin: 0.75em 0px 0px; position: relative; text-align: -webkit-auto;"&gt;
&lt;a href="http://pratapreddypilaka.blogspot.co.nz/2013/03/demo-of-phonegap-on-android.html"&gt;"&lt;span style="color: #888888;"&gt;Demo of PhoneGap on an Android&lt;/span&gt;&lt;span style="background-color: transparent; text-align: left;"&gt;".&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/rsYKGIqZcTE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/6728691266465956573/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/03/introduction-to-phonegap.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/6728691266465956573?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/6728691266465956573?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/rsYKGIqZcTE/introduction-to-phonegap.html" title="Introduction to PhoneGap" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-hJx1Oey_0JM/UVY0eBQLmcI/AAAAAAAADAA/6RjzRk0XSx4/s72-c/phonegap.jpeg" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/03/introduction-to-phonegap.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYMRnk_eyp7ImA9WhBXFk4.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-2523727685461625922</id><published>2013-03-26T21:32:00.001-07:00</published><updated>2013-03-30T02:36:27.743-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-30T02:36:27.743-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Using Delegate Control in Sharepoint</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
Before jumping to actual development, lets know which scenarios demand the usage of Delegate Controls in sharepoint.&lt;br /&gt;
&lt;br /&gt;
I have&amp;nbsp;designed header image&amp;nbsp;for my blog, and i want to have it on top of my sharepoint site.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-19pW_wtUkcE/UVJg2AMSAcI/AAAAAAAAC_A/Ukd4BmXe2jM/s1600/BlogHeader.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="74" src="http://3.bp.blogspot.com/-19pW_wtUkcE/UVJg2AMSAcI/AAAAAAAAC_A/Ukd4BmXe2jM/s640/BlogHeader.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
So how to add it to all the pages in my sharepoint site. &lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;Simple ! Add it to master page, and autoamtically it will be on top of every page in that site.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-V2FECDxUL08/UVJhS6TjIcI/AAAAAAAAC_I/SZ34VzM2lkM/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="402" src="http://1.bp.blogspot.com/-V2FECDxUL08/UVJhS6TjIcI/AAAAAAAAC_I/SZ34VzM2lkM/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now, i have a scenario where&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="background-color: yellow;"&gt;&lt;strong&gt;&amp;nbsp;I want to hide the header image in all the environments except Production and i dont want to change the code/wsp based on environments.&lt;/strong&gt;&lt;/span&gt;&lt;/blockquote&gt;
This can even be applicable to the many other scenarios like Google Analytics Script, or some times, user want the season based or situation based&amp;nbsp;header images or messages which can be changes just by activating ot deactivating features.&lt;br /&gt;
&lt;br /&gt;
This is where &lt;span style="background-color: yellow;"&gt;&lt;strong&gt;Delegate Controls&lt;/strong&gt;&lt;/span&gt; in sharepoint come to the picture. &lt;br /&gt;
Any .Net developer can answer the Question &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="background-color: yellow;"&gt;&lt;strong&gt;"What is a Delegate?"&lt;/strong&gt;&lt;/span&gt;&lt;/blockquote&gt;
The answer is "Its a Pointer to Function / Method", in this case, Delegate Control is a pointer to a Control which can be replaced at runtime based on Feature Activation or Deactivation.&lt;br /&gt;
&lt;br /&gt;
Now&amp;nbsp;that we understood the purpose of Delegate control, we will look at devlopment steps involved.&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;Step 1:&lt;/span&gt;&lt;/strong&gt; Open the Custom Master Page and add the below peice of code.&lt;br /&gt;
&lt;pre&gt;&amp;lt;SharePoint:DelegateControl runat="server" &lt;span style="background-color: yellow;"&gt;ControlId="BlogLogoControl"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
The ControlId is of most significant part, which tells sharepoint to substitute delegate control with any control with same ID.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-q1YEnSPu4es/UVJvQyXvZZI/AAAAAAAAC_U/0y8lF98hWQQ/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-q1YEnSPu4es/UVJvQyXvZZI/AAAAAAAAC_U/0y8lF98hWQQ/s400/2.png" width="268" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;Step 2:&lt;/span&gt;&lt;/strong&gt; Add the User control to project. I named it as &lt;strong&gt;ucLogoControl.ascx&lt;/strong&gt;. I have the image &lt;strong&gt;BlogHeader.jpg &lt;/strong&gt;deployed to Style Library/Images in my site. SO add the below peice of code to User control.&lt;br /&gt;
&lt;pre&gt;&amp;lt;img src="/Style Library/Images/BlogHeader.jpg"/&amp;gt;&lt;/pre&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;Step 3:&lt;/span&gt;&lt;/strong&gt; Add a Module to project which will take care of adding the user control to Delegate control. I named it as "&lt;strong&gt;DelegateModule&lt;/strong&gt;". Delete sample.txt file and modify the Elemnts.xml to resemble something like this.&lt;br /&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;Elements xmlns="&lt;a href="http://schemas.microsoft.com/sharepoint/"&gt;http://schemas.microsoft.com/sharepoint/&lt;/a&gt;"&amp;gt;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;span style="background-color: yellow;"&gt;Control Id = "BlogLogoControl"&lt;/span&gt; Sequence="90" ControlSrc="~/_controltemplates/SPDelegateProject/ucLogoControl.ascx"/&amp;gt;
&amp;lt;/Elements&amp;gt;
&lt;/pre&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;Step 4:&lt;/span&gt;&lt;/strong&gt; Create a feature and add "DelegateModule" to it. I named it &lt;strong&gt;"Site.LogoFeature". &lt;/strong&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-JfDa1rVf7nI/UVJxqmRgsNI/AAAAAAAAC_g/DMsV0RSiCDA/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="345" src="http://4.bp.blogspot.com/-JfDa1rVf7nI/UVJxqmRgsNI/AAAAAAAAC_g/DMsV0RSiCDA/s400/4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Let me summarize all the actions once before deployment.&lt;br /&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;We have removed the image from Masterpage&lt;/li&gt;
&lt;li&gt;Created a new usercontrol and added the image inside the user control.&lt;/li&gt;
&lt;li&gt;Created a module in which elements.xml signifies the control to be loaded in runtime&amp;nbsp;instead of&amp;nbsp;delegate control .&lt;/li&gt;
&lt;li&gt;Create a feature and associate the module to the newly created feature.&lt;/li&gt;
&lt;/ul&gt;
Now when you activate the feature, the delegate control will be substituted with my Image User control. If i dont want to display it, i will just disable the &lt;strong&gt;"Site.LogoFeature" &lt;/strong&gt;and that will tell sharepoint will not substitue anything in place of delegate control.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;Out Put:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;&lt;strong&gt;When Activated&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-i-c3Jhy6QeY/UVJ0HdjK3tI/AAAAAAAAC_o/9B-6Jp6ojUM/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="364" src="http://2.bp.blogspot.com/-i-c3Jhy6QeY/UVJ0HdjK3tI/AAAAAAAAC_o/9B-6Jp6ojUM/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;em&gt;&lt;strong&gt;When Deavtivated&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-pL7jMpSTCEo/UVJ1JVU8ifI/AAAAAAAAC_w/_vCkAz-Euxc/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="350" src="http://1.bp.blogspot.com/-pL7jMpSTCEo/UVJ1JVU8ifI/AAAAAAAAC_w/_vCkAz-Euxc/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;em&gt;&lt;/em&gt;&lt;br /&gt;
&lt;span style="background-color: yellow;"&gt;&lt;strong&gt;Code Base:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Search for "SPDelegateProject.zip" in &lt;a href="https://skydrive.live.com/#cid=56F6D80369352266&amp;amp;id=56F6D80369352266%21103" target="_blank"&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/RluFTAW-x0s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/2523727685461625922/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/03/using-delegate-control-in-sharepoint.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/2523727685461625922?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/2523727685461625922?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/RluFTAW-x0s/using-delegate-control-in-sharepoint.html" title="Using Delegate Control in Sharepoint" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-19pW_wtUkcE/UVJg2AMSAcI/AAAAAAAAC_A/Ukd4BmXe2jM/s72-c/BlogHeader.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/03/using-delegate-control-in-sharepoint.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4FSHc4eip7ImA9WhBXE0g.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-1226040294200110868</id><published>2013-03-26T18:53:00.004-07:00</published><updated>2013-03-26T21:35:19.932-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-26T21:35:19.932-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Deploying Custom Master Page Using a sharepoint Feature</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
In this module, we will see how to deploy a Custom master page to a sharepoint site, using a sharepoint feature.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;Step 1:&lt;/span&gt;&lt;/strong&gt; Create a sharepoint project. Add a Module to it. I named it as "MasterModule". By default the module will be created with&amp;nbsp;2 files, &amp;nbsp;Elemnts.xml and Sample.txt.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;Step 2:&lt;/span&gt;&lt;/strong&gt; You can add / create a Custom Masterpage file as per your requirment. For my purpose, i am trying to reuse the existing V4.Master.&lt;br /&gt;
&lt;br /&gt;
If you are trying to export the master page from Sharepoint Designer, you may end up with error&lt;br /&gt;
&lt;span id="ctl00_PlaceHolderMain_LabelMessage"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="color: red;"&gt;&lt;strong&gt;http://server/_catalogs/masterpage/v4_Modified.master(26): error CS0030: Cannot convert type 'Microsoft.SharePoint.WebControls.ScriptLink' to 'System.Web.UI.IAttributeAccessor'&lt;/strong&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;a name='more'&gt;&lt;/a&gt;This happens when you use SaveAs option in designer to export V4.Master file. To avoid this, Just Open V4.Master file in Designer, copy all the markup and put it in a text file and rename it to V4.Master. Use this file Instead. &lt;br /&gt;
Or &lt;br /&gt;
Got to "Site Settings" -&amp;gt; "Master Page Gallery" -&amp;gt; Right click on page and Select "Send To" -&amp;gt;"Download a Copy" options to save the file to you local disk.&lt;br /&gt;
&lt;br /&gt;
I just added a Header part saying "&lt;span style="background-color: yellow;"&gt;Pratap's Modified Master&lt;/span&gt;" to differentiate the modified master from regular master.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;Step 3:&lt;/span&gt;&lt;/strong&gt; When you add the module, by deafult a new Feature will be added, else add a new feature and add the module to that feature. I named the feature as "Site.MasterPageFeature".&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-0tRTlSTGs6E/UVJOZgS9EQI/AAAAAAAAC-o/m2wgy8cLgMQ/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="444" src="http://4.bp.blogspot.com/-0tRTlSTGs6E/UVJOZgS9EQI/AAAAAAAAC-o/m2wgy8cLgMQ/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;Step 4:&lt;/span&gt;&lt;/strong&gt;Modify the content of Elelments.xml so that the Masterpage will be Deployed to "_Catalog/MasterPage" library.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;Elements xmlns="&lt;a href="http://schemas.microsoft.com/sharepoint/"&gt;http://schemas.microsoft.com/sharepoint/&lt;/a&gt;"&amp;gt;
&amp;nbsp; &amp;lt;Module Name="MasterModule" List="116" Url="_catalogs/masterpage"&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; &amp;lt;File Path="MasterModule\v4_Modified.master" Url="v4_Modified.master" Type="GhostableInLibrary" /&amp;gt;
&amp;lt;/Module&amp;gt;
&amp;lt;/Elements&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style="background-color: yellow;"&gt;&lt;strong&gt;Step 5:&lt;/strong&gt;&lt;/span&gt; Now when you deploy the solution, the custom master page will be deployed, but its not assigned as default pasterpage for the site. You can do it manually, but it is not the preffered way. So, in order to acheive this programatically, we need to use the Event Receiver for this task.&lt;br /&gt;
&lt;br /&gt;
Right click on Feature and select "Add Event Receiver" option. Now, below is the code for changing the Master page programatically. We will be using events "FeatureActivated" and "FeatureDeActivated" events for this.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&amp;nbsp; [Guid("be79ba52-669c-4d89-826c-fe4abf2dceaa")]
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class SiteEventReceiver : SPFeatureReceiver
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Uncomment the method below to handle the event raised after a feature has been activated.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public override void FeatureActivated(SPFeatureReceiverProperties properties)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var site = (SPSite)properties.Feature.Parent;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; site.RootWeb.MasterUrl = site.RootWeb.ServerRelativeUrl + "_catalogs/masterpage/v4_Modified.master";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; site.RootWeb.CustomMasterUrl = site.RootWeb.ServerRelativeUrl + "_catalogs/masterpage/v4_Modified.master";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; site.RootWeb.Update();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Uncomment the method below to handle the event raised before a feature is deactivated&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var site = (SPSite)properties.Feature.Parent;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; site.RootWeb.MasterUrl = site.RootWeb.ServerRelativeUrl + "_catalogs/masterpage/v4.master";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; site.RootWeb.CustomMasterUrl = site.RootWeb.ServerRelativeUrl + "_catalogs/masterpage/v4.master";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; site.RootWeb.Update();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;
&lt;br /&gt;
Now, deploy the solution and Activate the "Site.MasterPageFeature" from site collection features, the site will be transformed to this, using your custom master page.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-ZgVpBxbWoKM/UVJQ4sVDXQI/AAAAAAAAC-w/de1jpUBNwbE/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="422" src="http://4.bp.blogspot.com/-ZgVpBxbWoKM/UVJQ4sVDXQI/AAAAAAAAC-w/de1jpUBNwbE/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;&amp;nbsp;Code Sample:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;Search for "SPDelegateProject.zip" in &lt;a href="https://skydrive.live.com/#cid=56F6D80369352266&amp;amp;id=56F6D80369352266%21103" target="_blank"&gt;here&lt;/a&gt;. This sample will have code for both Custom Master page and for&lt;a href="http://pratapreddypilaka.blogspot.co.nz/2013/03/using-delegate-control-in-sharepoint.html" target="_blank"&gt; Delegate Control&lt;/a&gt; as well. &lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style="background-color: yellow;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/fsuQDeg2Ro8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/1226040294200110868/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/03/deploying-custom-master-page-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/1226040294200110868?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/1226040294200110868?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/fsuQDeg2Ro8/deploying-custom-master-page-using.html" title="Deploying Custom Master Page Using a sharepoint Feature" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-0tRTlSTGs6E/UVJOZgS9EQI/AAAAAAAAC-o/m2wgy8cLgMQ/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/03/deploying-custom-master-page-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUESH04eip7ImA9WhBXFk4.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-5891705521200370853</id><published>2013-03-10T21:34:00.004-07:00</published><updated>2013-03-30T02:36:49.332-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-30T02:36:49.332-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Granting Anonymous Access to Sharepoint List / Library Programtically</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
In this post we will see how to enable and disable Anonymous access to a List or Document library from a sharepoint feature (C# code).&lt;br /&gt;
&lt;br /&gt;
There are 3 different steps involved in granting Anonymous access to a List/Library in a right way.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 1: &lt;/strong&gt;Enabling the anonymous accesss to the Web application from Central Admin. This does not mean that the whole web application is now anonymous. This step signifies that, this web application has ability to host resources that can be accessed by Anonymous user.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-d1JPgG3Utug/UT1U21zwGUI/AAAAAAAAC9Y/fGn4JIV_V3k/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-d1JPgG3Utug/UT1U21zwGUI/AAAAAAAAC9Y/fGn4JIV_V3k/s1600/1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-2ICn7KBzdpw/UT1U7LGKYwI/AAAAAAAAC9g/ZIoZdaapr1c/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="332" src="http://1.bp.blogspot.com/-2ICn7KBzdpw/UT1U7LGKYwI/AAAAAAAAC9g/ZIoZdaapr1c/s400/2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-j1QSjHuJmCQ/UT1U_1OVLXI/AAAAAAAAC9o/EMfg_PcZa0E/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="305" src="http://3.bp.blogspot.com/-j1QSjHuJmCQ/UT1U_1OVLXI/AAAAAAAAC9o/EMfg_PcZa0E/s400/3.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now click save and close Central Admin. I am pointing again that &lt;strong&gt;the above step will not make whole webapplication accessible to anonymous users&lt;/strong&gt;. This will &lt;strong&gt;create scope for hosting something that can be accessible by anonymous user&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 2: &lt;/strong&gt;Enabling the Anonymous permissions in Web application settings. Go to Site Permission screen. As you have already enabled Anonymous access for this web application from central admin, a new button "Anonymnous Access" will be appeared on the ribbon.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-E9a-C5oWqWc/UT1ZLUi92VI/AAAAAAAAC9w/RDhRk-qqa3Q/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="138" src="http://1.bp.blogspot.com/-E9a-C5oWqWc/UT1ZLUi92VI/AAAAAAAAC9w/RDhRk-qqa3Q/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This will open a popup with 3 options shown below&amp;nbsp;specifying whether you want to enable access on whole site, or only lists and libraries or nothing.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-SRfXRognJGA/UT1aE3vzBDI/AAAAAAAAC94/amUHgydvc3U/s1600/11-03-2013+5-11-54+p-m-.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="160" src="http://3.bp.blogspot.com/-SRfXRognJGA/UT1aE3vzBDI/AAAAAAAAC94/amUHgydvc3U/s640/11-03-2013+5-11-54+p-m-.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I selected Lists and Libraries. Even now &lt;strong&gt;it doesnt mean that Lists and libraries in my web application are accessible to Anonymous user&lt;/strong&gt;. here comes the next step.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 3: &lt;/strong&gt;Now open the List&amp;nbsp;/ Library&amp;nbsp;for which you want Anonymous access,&amp;nbsp;and go to List / Library Permissions.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-lnOWJzJVLPk/UT1bzZv_lcI/AAAAAAAAC-A/gz1UF9FkFpA/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="78" src="http://1.bp.blogspot.com/-lnOWJzJVLPk/UT1bzZv_lcI/AAAAAAAAC-A/gz1UF9FkFpA/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now, click on Anonymous Access button on ribbon, and a popup will appear where you can select which kind of permissions you want to give for Unauthenticated user.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-YA6dRNePYQI/UT1cxTFs-bI/AAAAAAAAC-I/HK8Nb7UXL0w/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="298" src="http://3.bp.blogspot.com/-YA6dRNePYQI/UT1cxTFs-bI/AAAAAAAAC-I/HK8Nb7UXL0w/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now, the list can be accessed by unauthenticated / anonymous users.&lt;br /&gt;
&lt;br /&gt;
But, in real time scenarios, the &lt;strong&gt;step 3 is not recomended&lt;/strong&gt; as it involves manual intervention in granting access, which is not possible in most of the PRODUCTION scenarios.&lt;br /&gt;
&lt;br /&gt;
So, it is recomended to perform step 3 using a feature activation or de-activation.&lt;br /&gt;
Here is the code for making a Document library anonymous while activating a feature.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-9aXEcxK4n5s/UT1eTu4txNI/AAAAAAAAC-Q/P9BzmNmxEAE/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="488" src="http://2.bp.blogspot.com/-9aXEcxK4n5s/UT1eTu4txNI/AAAAAAAAC-Q/P9BzmNmxEAE/s640/8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here is the code for removing&amp;nbsp;Anonymous access to a Document library while de-activating a feature.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-kErvKa1fI2I/UT1eisDcvhI/AAAAAAAAC-Y/qWyqjkwePXY/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="470" src="http://2.bp.blogspot.com/-kErvKa1fI2I/UT1eisDcvhI/AAAAAAAAC-Y/qWyqjkwePXY/s640/9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Happy Coding !&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/UMwUYVL1vDQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/5891705521200370853/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/03/granting-anonymous-access-to-list.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/5891705521200370853?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/5891705521200370853?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/UMwUYVL1vDQ/granting-anonymous-access-to-list.html" title="Granting Anonymous Access to Sharepoint List / Library Programtically" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-d1JPgG3Utug/UT1U21zwGUI/AAAAAAAAC9Y/fGn4JIV_V3k/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/03/granting-anonymous-access-to-list.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIBRXs7eCp7ImA9WhBXGE0.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-618074107462732599</id><published>2013-03-10T03:25:00.003-07:00</published><updated>2013-04-01T01:22:34.500-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-01T01:22:34.500-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mobile" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Multi Tab App with Async Task</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
&lt;b&gt;Objective: &lt;/b&gt;To create an android app, with multiple tabs catering different types of questions, in which data will be saved to SQL-Lite using Asynchronous approach (Async Tasks concept.)&lt;br /&gt;
&lt;br /&gt;
This post will be covering only a part of the actual objective.&lt;br /&gt;
I created a Multi Tab application and each tab pointing to &amp;nbsp;a different fragment.&lt;br /&gt;
Now in every tab click the data has to be saved without blocking the user actions.&lt;br /&gt;
For this i have chosen Async Task concept.&lt;br /&gt;
As of now i just put up a simple dialog display demonstrating the Async actions while user navigates between the tabs.&lt;br /&gt;
In up coming post, i will finish the code for even saving the data to SQL-Lite database, thus completing the actual intent.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-xzoU2yc8yTs/UTzTBnpsJrI/AAAAAAAAC8s/jpx51gvftxU/s1600/Screenshot_2013-03-11-07-32-35.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/-xzoU2yc8yTs/UTzTBnpsJrI/AAAAAAAAC8s/jpx51gvftxU/s640/Screenshot_2013-03-11-07-32-35.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-CxUunVB_3zQ/UTzTDO3ymkI/AAAAAAAAC9M/wj6VQVl4cFw/s1600/Screenshot_2013-03-11-07-35-36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-CxUunVB_3zQ/UTzTDO3ymkI/AAAAAAAAC9M/wj6VQVl4cFw/s640/Screenshot_2013-03-11-07-35-36.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-snWqyI87HKo/UTzTBvX_ObI/AAAAAAAAC80/IDY4cM-2HUI/s1600/Screenshot_2013-03-11-07-34-36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-snWqyI87HKo/UTzTBvX_ObI/AAAAAAAAC80/IDY4cM-2HUI/s640/Screenshot_2013-03-11-07-34-36.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-mgrbhkmm6Y0/UTzTDDR4lDI/AAAAAAAAC9E/LY1OPDPpWCY/s1600/Screenshot_2013-03-11-07-35-40.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-mgrbhkmm6Y0/UTzTDDR4lDI/AAAAAAAAC9E/LY1OPDPpWCY/s640/Screenshot_2013-03-11-07-35-40.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-6NRpZgd1I4Q/UTzTB2UPksI/AAAAAAAAC8w/2b5BCCAt6xU/s1600/Screenshot_2013-03-11-07-35-28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/-6NRpZgd1I4Q/UTzTB2UPksI/AAAAAAAAC8w/2b5BCCAt6xU/s640/Screenshot_2013-03-11-07-35-28.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-8iwMOtHQDxY/UTzTDe4nJ4I/AAAAAAAAC9I/DLzWlG4kWME/s1600/Screenshot_2013-03-11-07-35-46.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/-8iwMOtHQDxY/UTzTDe4nJ4I/AAAAAAAAC9I/DLzWlG4kWME/s640/Screenshot_2013-03-11-07-35-46.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Happy coding !&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/9ojlGFXA08w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/618074107462732599/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/03/multi-tab-app-with-async-task.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/618074107462732599?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/618074107462732599?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/9ojlGFXA08w/multi-tab-app-with-async-task.html" title="Multi Tab App with Async Task" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-xzoU2yc8yTs/UTzTBnpsJrI/AAAAAAAAC8s/jpx51gvftxU/s72-c/Screenshot_2013-03-11-07-32-35.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/03/multi-tab-app-with-async-task.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIDRXg6eSp7ImA9WhBXGE0.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-630602208314324236</id><published>2013-03-03T01:03:00.002-08:00</published><updated>2013-04-01T01:22:54.611-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-01T01:22:54.611-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mobile" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Shared Preferences and Yes/No Alert Dialog in Android</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
In this post, my intent is to use the internal memory of an android and save / retrieve the data from different views.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We have several&amp;nbsp;options to save data on a Android device, like Compact SQL, Files and Shared Preferences.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So, i have a One Page Application, which will accepts name and save it to the internal memory and then retrieves the data to display i on second screen.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-c5aAmRUr2cg/UTMOheFEsmI/AAAAAAAAC6o/MHe7ikLkPrE/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="378" src="http://1.bp.blogspot.com/-c5aAmRUr2cg/UTMOheFEsmI/AAAAAAAAC6o/MHe7ikLkPrE/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
The markup of view is:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #009193;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #4e9192;"&gt;LinearLayout&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: #932192;"&gt;xmlns:android&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"http://schemas.android.com/apk/res/android"&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;xmlns:tools&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"http://schemas.android.com/tools"&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;android:layout_width&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"match_parent"&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;android:layout_height&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"match_parent"&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;android:paddingBottom&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"@dimen/activity_vertical_margin"&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;android:paddingLeft&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"@dimen/activity_horizontal_margin"&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;android:paddingRight&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"@dimen/activity_horizontal_margin"&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;android:paddingTop&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"@dimen/activity_vertical_margin"&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;tools:context&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;".MainActivity"&lt;span style="color: black;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;android:orientation&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"vertical"&lt;/span&gt;&lt;span style="color: #009193;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: black;"&gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px; min-height: 15px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #009193;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #4e9192;"&gt;EditText&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;android:id&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"@+id/editName"&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;android:layout_width&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"match_parent"&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;android:layout_height&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"wrap_content"&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #3933ff;"&gt;&amp;nbsp; &lt;/span&gt;android:ems&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"10"&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192; text-decoration: underline;"&gt;android:hint&lt;/span&gt;&lt;span style="color: black; text-decoration: underline;"&gt;=&lt;/span&gt;&lt;span style="text-decoration: underline;"&gt;"Name Here"&lt;/span&gt;&lt;span style="color: #009193;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px; min-height: 15px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #009193;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #4e9192;"&gt;requestFocus&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: #009193;"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #4e9192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #009193;"&gt;&amp;lt;/&lt;/span&gt;EditText&lt;span style="color: #009193;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px; min-height: 15px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #009193;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #4e9192;"&gt;Button&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;android:id&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"@+id/btnSAVE"&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;style&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"?android:attr/buttonStyleSmall"&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;android:layout_width&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"wrap_content"&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;android:layout_height&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"wrap_content"&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #932192; text-decoration: underline;"&gt;android:text&lt;/span&gt;&lt;span style="color: black; text-decoration: underline;"&gt;=&lt;/span&gt;&lt;span style="text-decoration: underline;"&gt;"Save"&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;android:onClick&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"SaveData"&lt;/span&gt;&lt;span style="color: #009193;"&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #4e9192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #009193;"&gt;&amp;lt;&lt;/span&gt;TextView&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;android:id&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"@+id/lblName"&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;android:layout_width&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"wrap_content"&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;android:layout_height&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;"wrap_content"&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #932192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;android:text&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;span style="color: #3933ff;"&gt;""&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #932192;"&gt;android:textAppearance&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"?android:attr/textAppearanceMedium"&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: #009193;"&gt;/&amp;gt;&lt;/span&gt; &amp;nbsp;&lt;/div&gt;
&lt;div style="color: #4e9192; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #009193;"&gt;&amp;lt;/&lt;/span&gt;LinearLayout&lt;span style="color: #009193;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
Before looking at SaveData() method, we need to see how to create the shared preference object.&lt;br /&gt;
We need to create the SharedPrefrence object on OnCreate method of Activity.&lt;br /&gt;
The Activity Code follows,&lt;br /&gt;
&lt;pre&gt;&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;package&lt;/span&gt; com.example.simplesave;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.os.Bundle;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.app.Activity;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.app.AlertDialog;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.content.Context;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.content.DialogInterface;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.content.Intent;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.content.SharedPreferences;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.view.Menu;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.view.View;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; &lt;span style="text-decoration: underline;"&gt;android.widget.Button&lt;/span&gt;;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.widget.EditText;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.widget.TextView;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;
&lt;/span&gt;
&lt;span style="color: #931a68;"&gt;public&lt;/span&gt; &lt;span style="color: #931a68;"&gt;class&lt;/span&gt; MainActivity &lt;span style="color: #931a68;"&gt;extends&lt;/span&gt; Activity {&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;SharedPreferences &lt;span style="color: #0326cc;"&gt;prefs&lt;/span&gt;;&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;String &lt;/span&gt;&lt;span style="color: #0326cc;"&gt;SavedNameKey&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"com.example.simplesave.SavedName"&lt;span style="color: black;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #777777; font-family: Monaco; font-size: 11px;"&gt;
@Override&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span style="color: #931a68;"&gt;protected&lt;/span&gt; &lt;span style="color: #931a68;"&gt;void&lt;/span&gt; onCreate(Bundle savedInstanceState) {&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&lt;span style="color: #931a68;"&gt;super&lt;/span&gt;.onCreate(savedInstanceState);&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;setContentView(R.layout.&lt;span style="color: #0326cc;"&gt;activity_main&lt;/span&gt;);&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt; &lt;span style="color: #0326cc;"&gt;prefs&lt;/span&gt; = &lt;span style="color: #931a68;"&gt;this&lt;/span&gt;.getSharedPreferences(&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&lt;span class="Apple-tab-span"&gt;   &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;"com.example.simplesave"&lt;span style="color: black;"&gt;, Context.&lt;/span&gt;&lt;span style="color: #0326cc;"&gt;MODE_PRIVATE&lt;/span&gt;&lt;span style="color: black;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt; }&lt;/div&gt;
&lt;div style="color: #777777; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span style="color: #931a68;"&gt;public&lt;/span&gt; &lt;span style="color: #931a68;"&gt;boolean&lt;/span&gt; onCreateOptionsMenu(Menu menu) {&lt;/div&gt;
&lt;div style="color: #4e9072; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;  &lt;/span&gt;// Inflate the menu; this adds items to the action bar if it is present.&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;getMenuInflater().inflate(R.menu.&lt;span style="color: #0326cc;"&gt;main&lt;/span&gt;, menu);&lt;/div&gt;
&lt;div style="color: #931a68; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;  &lt;/span&gt;return&lt;span style="color: black;"&gt; &lt;/span&gt;true&lt;span style="color: black;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px; min-height: 15px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span style="color: #931a68;"&gt;public&lt;/span&gt; &lt;span style="color: #931a68;"&gt;void&lt;/span&gt; SaveData(View v)&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;{&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;EditText txtName= (EditText) findViewById(R.id.&lt;span style="color: #0326cc;"&gt;editName&lt;/span&gt;);&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&lt;span style="color: #0326cc;"&gt;prefs&lt;/span&gt;.edit().putString(&lt;span style="color: #0326cc;"&gt;SavedNameKey&lt;/span&gt;, txtName.getText().toString()).commit();&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;TextView lblName=(TextView) findViewById(R.id.&lt;span style="color: #0326cc;"&gt;lblName&lt;/span&gt;);&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;lblName.setText(&lt;span style="color: #3933ff;"&gt;"Name :"&lt;/span&gt;+txtName.getText().toString());&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&lt;span style="color: #931a68;"&gt;final&lt;/span&gt; Intent intent=&lt;span style="color: #931a68;"&gt;new&lt;/span&gt; Intent(&lt;span style="color: #931a68;"&gt;this&lt;/span&gt;,DisplayMemory.&lt;span style="color: #931a68;"&gt;class&lt;/span&gt;);  &lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&lt;span style="color: #931a68;"&gt;new&lt;/span&gt; AlertDialog.Builder(&lt;span style="color: #931a68;"&gt;this&lt;/span&gt;)&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; .setTitle(&lt;span style="color: #3933ff;"&gt;"Data Saved"&lt;/span&gt;)&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; .setMessage(&lt;/span&gt;"Are you sure you want to move to next Page to Test Sahred Preference approach?"&lt;span style="color: black;"&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&amp;nbsp; &amp;nbsp; .setPositiveButton(&lt;span style="color: #3933ff;"&gt;"Yes"&lt;/span&gt;, &lt;span style="color: #931a68;"&gt;new&lt;/span&gt; DialogInterface.OnClickListener() {&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #931a68;"&gt;public&lt;/span&gt; &lt;span style="color: #931a68;"&gt;void&lt;/span&gt; onClick(DialogInterface dialog, &lt;span style="color: #931a68;"&gt;int&lt;/span&gt; which) {&amp;nbsp;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;startActivity(intent);&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; })&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; .setNegativeButton(&lt;span style="color: #3933ff;"&gt;"No"&lt;/span&gt;, &lt;span style="color: #931a68;"&gt;new&lt;/span&gt; DialogInterface.OnClickListener() {&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #931a68;"&gt;public&lt;/span&gt; &lt;span style="color: #931a68;"&gt;void&lt;/span&gt; onClick(DialogInterface dialog, &lt;span style="color: #931a68;"&gt;int&lt;/span&gt; which) {&amp;nbsp;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #4e9072;"&gt;// do nothing&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&amp;nbsp; &amp;nbsp; })&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; .show();&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
}&lt;/div&gt;
&lt;/pre&gt;
So, once the data is saved, the user will be prompted for permission, to move to next page to see what we can retrieve from the Memory. For this we have used&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: large;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Yes / No AlertDialog&lt;/span&gt;&lt;/blockquote&gt;
Once the user said No, he will stay on Main Activity and a display message was shown on below of Text field.&lt;br /&gt;
If the user said Yes, he will be moved to second screen, "Display Memory", where we can retrieve the data from memory and will be displayed using OnCreate method of that screen.&lt;br /&gt;
&lt;pre&gt;&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;package&lt;/span&gt; com.example.simplesave;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px; min-height: 15px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.os.Bundle;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.app.Activity;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.content.Context;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.content.Intent;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.content.SharedPreferences;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.view.Menu;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;import&lt;/span&gt; android.widget.TextView;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px; min-height: 15px;"&gt;
&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: #931a68;"&gt;public&lt;/span&gt; &lt;span style="color: #931a68;"&gt;class&lt;/span&gt; DisplayMemory &lt;span style="color: #931a68;"&gt;extends&lt;/span&gt; Activity {&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px; min-height: 15px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;SharedPreferences &lt;span style="color: #0326cc;"&gt;prefs&lt;/span&gt;;&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;String &lt;/span&gt;&lt;span style="color: #0326cc;"&gt;SavedNameKey&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;"com.example.simplesave.SavedName"&lt;span style="color: black;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #777777; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;
&lt;/span&gt;
&lt;span style="color: black;"&gt; &lt;/span&gt;@Override&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span style="color: #931a68;"&gt;protected&lt;/span&gt; &lt;span style="color: #931a68;"&gt;void&lt;/span&gt; onCreate(Bundle savedInstanceState) {&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&lt;span style="color: #931a68;"&gt;super&lt;/span&gt;.onCreate(savedInstanceState);&lt;/div&gt;
&lt;div style="color: #4e9072; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;  &lt;/span&gt;//setContentView(R.layout.activity_display_memory);&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt; Intent &lt;span style="text-decoration: underline;"&gt;intent&lt;/span&gt; = getIntent();&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt; &lt;span style="color: #0326cc;"&gt;prefs&lt;/span&gt; = &lt;span style="color: #931a68;"&gt;this&lt;/span&gt;.getSharedPreferences(&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&lt;span class="Apple-tab-span"&gt;   &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;"com.example.simplesave"&lt;span style="color: black;"&gt;, Context.&lt;/span&gt;&lt;span style="color: #0326cc;"&gt;MODE_PRIVATE&lt;/span&gt;&lt;span style="color: black;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #4e9072; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt; &lt;/span&gt;// Create the text view&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; TextView textView = &lt;span style="color: #931a68;"&gt;new&lt;/span&gt; TextView(&lt;span style="color: #931a68;"&gt;this&lt;/span&gt;);&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; textView.setTextSize(40);&lt;/div&gt;
&lt;div style="color: #3933ff; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; textView.setText(&lt;/span&gt;"Data Retrieved from Shared Preferences: "&lt;span style="color: black;"&gt;+&lt;/span&gt;&lt;span style="color: #0326cc;"&gt;prefs&lt;/span&gt;&lt;span style="color: black;"&gt;.getString(&lt;/span&gt;&lt;span style="color: #0326cc;"&gt;SavedNameKey&lt;/span&gt;&lt;span style="color: black;"&gt;, &lt;/span&gt;""&lt;span style="color: black;"&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px; min-height: 15px;"&gt;
&lt;span style="color: black;"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color: #4e9072;"&gt;// Set the text view as the activity layout&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; setContentView(textView);&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px; min-height: 15px;"&gt;
&lt;/div&gt;
&lt;div style="color: #777777; font-family: Monaco; font-size: 11px;"&gt;
@Override&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span style="color: #931a68;"&gt;public&lt;/span&gt; &lt;span style="color: #931a68;"&gt;boolean&lt;/span&gt; onCreateOptionsMenu(Menu menu) {&lt;/div&gt;
&lt;div style="color: #4e9072; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;  &lt;/span&gt;// Inflate the menu; this adds items to the action bar if it is present.&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt;  &lt;/span&gt;getMenuInflater().inflate(R.menu.&lt;span style="color: #0326cc;"&gt;display_memory&lt;/span&gt;, menu);&lt;/div&gt;
&lt;div style="color: #931a68; font-family: Monaco; font-size: 11px;"&gt;
&lt;span style="color: black;"&gt;  &lt;/span&gt;return&lt;span style="color: black;"&gt; &lt;/span&gt;true&lt;span style="color: black;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px;"&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div style="font-family: Monaco; font-size: 11px; min-height: 15px;"&gt;
}&lt;/div&gt;
&lt;/pre&gt;
&lt;b&gt;And here is the results . . .&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;i&gt;&amp;nbsp;Default Display:&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-AJdBrUw9ja0/UTMQ4OTD46I/AAAAAAAAC7A/NdVSJT-3OYc/s1600/Screenshot_2013-03-03-21-44-05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-AJdBrUw9ja0/UTMQ4OTD46I/AAAAAAAAC7A/NdVSJT-3OYc/s640/Screenshot_2013-03-03-21-44-05.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;i&gt;Input Text:&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-VIDGEdIUKOU/UTMQ32posRI/AAAAAAAAC7E/DMfxPoNGTaM/s1600/Screenshot_2013-03-03-21-44-21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-VIDGEdIUKOU/UTMQ32posRI/AAAAAAAAC7E/DMfxPoNGTaM/s640/Screenshot_2013-03-03-21-44-21.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;i&gt;Button Click:&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-sE7dAqVfm-8/UTMQ3z8GGEI/AAAAAAAAC7M/QJmrh1t7HUs/s1600/Screenshot_2013-03-03-21-44-26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/-sE7dAqVfm-8/UTMQ3z8GGEI/AAAAAAAAC7M/QJmrh1t7HUs/s640/Screenshot_2013-03-03-21-44-26.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;i&gt;If user says No:&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-5QVL9NeNtGM/UTMQ5U3qOVI/AAAAAAAAC7U/-3JM1fOu934/s1600/Screenshot_2013-03-03-21-44-36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-5QVL9NeNtGM/UTMQ5U3qOVI/AAAAAAAAC7U/-3JM1fOu934/s640/Screenshot_2013-03-03-21-44-36.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;If user says "Yes":&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-d-vo_ZoLiH0/UTMQ5xiD-HI/AAAAAAAAC7c/w2esVqErls0/s1600/Screenshot_2013-03-03-21-44-42.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/-d-vo_ZoLiH0/UTMQ5xiD-HI/AAAAAAAAC7c/w2esVqErls0/s640/Screenshot_2013-03-03-21-44-42.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
We will see using Compact SQL to save data in upcoming posts.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/SBg3TJerIw8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/630602208314324236/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/03/shared-preferences-and-yesno-alert.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/630602208314324236?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/630602208314324236?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/SBg3TJerIw8/shared-preferences-and-yesno-alert.html" title="Shared Preferences and Yes/No Alert Dialog in Android" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-c5aAmRUr2cg/UTMOheFEsmI/AAAAAAAAC6o/MHe7ikLkPrE/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/03/shared-preferences-and-yesno-alert.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUMQn4-eCp7ImA9WhBXFk4.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-3218150390496448585</id><published>2013-02-24T00:21:00.001-08:00</published><updated>2013-03-30T02:38:03.050-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-30T02:38:03.050-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>My First Android App</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-jcqbILUYbMI/USnNc-GM0WI/AAAAAAAAC4A/StgVOg6wFD8/s1600/android_platform.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/-jcqbILUYbMI/USnNc-GM0WI/AAAAAAAAC4A/StgVOg6wFD8/s200/android_platform.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I have always worked on .Net technologies like Windows applications using C#, Web applications using Asp.Net then moved to creating light weight Web applications using MVC Razor. &amp;nbsp;Apart from that stream, i have been working on Sharepoint 2007, Sharepoint 2010 and now Sharepoint 2013.&lt;br /&gt;
&lt;br /&gt;
One of my client raised a concern of his application access via Mobiles and Tablets. I have looked at several options like . .&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;ol style="text-align: left;"&gt;
&lt;li&gt;As Sharepoint 2010 didn't support Html 5, I need to be very care full while designing the screen. I need to use Ultra responsive design to make it work on Portable devices.&lt;/li&gt;
&lt;li&gt;Even though Sharepoint 2013 supports Html 5 and Mobile devices, the development and infrastructure is different from regular Solution approach we follow. &lt;a href="http://msdn.microsoft.com/en-in/library/jj163228.aspx" target="_blank"&gt;Look Here . . .&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Sharepoint 2013 has Apps model, which wont be a suitable solution here, as the apps will be used for reusability and reliability, not for portable device usage.&lt;/li&gt;
&lt;li&gt;Next option is to create a MVC4 mobile application which will take care of almost all aspects of mobile devices and desktops well.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
All the above approaches are trying to mould our application to portable devices over internet.&lt;br /&gt;
&lt;br /&gt;
Now, lets talk about real Mobile Apps. I mean an App (Android or Mac or Windows) which can be created and uploaded to a Market place. Users can be downloading the App on to their mobiles / tablets and ready to use it . . . now that is called mobile app.&lt;br /&gt;
&lt;br /&gt;
So this time i have picked Android. Started learning "Android Development" using "Eclipse".&lt;br /&gt;
Android is a open source technology and there is a lot of material available on internet.&lt;br /&gt;
I have been following this &lt;a href="http://developer.android.com/training/index.html" target="_blank"&gt;site&lt;/a&gt;&amp;nbsp;and created my first Android App and deployed to my mobile.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-3L87G_zyZSI/USnL5ey58bI/AAAAAAAAC3c/vJ_cFyeg6zw/s1600/Screenshot_2013-02-24-20-44-25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/-3L87G_zyZSI/USnL5ey58bI/AAAAAAAAC3c/vJ_cFyeg6zw/s640/Screenshot_2013-02-24-20-44-25.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-9K8jdhlO1CQ/USnMD5TWmiI/AAAAAAAAC3k/hsis0duZJpc/s1600/Screenshot_2013-02-24-20-44-29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-9K8jdhlO1CQ/USnMD5TWmiI/AAAAAAAAC3k/hsis0duZJpc/s640/Screenshot_2013-02-24-20-44-29.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-6QKbMmTqnyI/USnObf3rPtI/AAAAAAAAC48/um7tbfvpWF0/s1600/Screenshot_2013-02-24-20-44-42.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-6QKbMmTqnyI/USnObf3rPtI/AAAAAAAAC48/um7tbfvpWF0/s640/Screenshot_2013-02-24-20-44-42.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-wPQ9hWeFTdE/USnMQmxUAzI/AAAAAAAAC30/svLRYF7l0Ns/s1600/Screenshot_2013-02-24-20-44-47.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/-wPQ9hWeFTdE/USnMQmxUAzI/AAAAAAAAC30/svLRYF7l0Ns/s640/Screenshot_2013-02-24-20-44-47.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
We will see more and more posts on Android development as well on this Blog . . .&lt;br /&gt;
Its not about technology , but important thing is that you LEARN . . .&amp;nbsp;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/VEAvzaW57mY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/3218150390496448585/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/02/my-first-android-app.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/3218150390496448585?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/3218150390496448585?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/VEAvzaW57mY/my-first-android-app.html" title="My First Android App" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-jcqbILUYbMI/USnNc-GM0WI/AAAAAAAAC4A/StgVOg6wFD8/s72-c/android_platform.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/02/my-first-android-app.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUDRH07cCp7ImA9WhBXFk4.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-3356054443711290020</id><published>2013-02-11T02:35:00.003-08:00</published><updated>2013-03-30T02:37:55.308-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-30T02:37:55.308-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Why Server 2012 ?</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
If you go through the &lt;a href="http://technet.microsoft.com/en-us/library/cc262485.aspx" target="_blank"&gt;Hardware / Software requirements&lt;/a&gt; of Sharepoint 2013, you can see that server 2008 R2 can also run sharepoint 2013.&lt;br /&gt;
We know Server 2012 is awesome and very useful in Usage and Performance perspectives , especially for Sharepoint 2013. But we cannot give such a vague answer when a client asks the same question.&lt;br /&gt;
&lt;span style="font-size: x-large;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Why&amp;nbsp;Server 2012?&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Reason 1: ReFS &amp;amp; Storage Spaces&lt;/b&gt;&lt;br /&gt;
NTFS file system has been introduced with Windows NT 3.1 in 1993, and now countless servers are using it for file system management from last 19 years. Even NTFS system is susceptible to corruption of File metadata while saves because of In-Place updation.&lt;br /&gt;
&lt;br /&gt;
Server 2012 has &lt;b&gt;Resilient File System(ReFS)&lt;/b&gt;, which uses "Allocate-On-Write" methodology instead on In-Place modifications.&amp;nbsp;&lt;span style="background-color: white; font-family: 'Lucida Grande', Arial, sans-serif; font-size: 12px; line-height: 20px;"&gt;&amp;nbsp;&lt;/span&gt;It also uses checksums for metadata as another measure of validating saved data; you have the ability to enable checksums for the data as well. Microsoft calls this use of checksums Integrity Streams.&lt;br /&gt;
&lt;br /&gt;
Storage Spaces is a new feature in Server 2012 that lets you use inexpensive hard drives to create a storage pool, which can then be divided into spaces that are used like physical disks. Storage Spaces provides the ability to "thin provision" volumes, which means you can create volumes of a virtual size larger than what is actually available in terms of physical capacity. More physical storage can be added to the pool to increase the physical capacity without affecting the virtual volume. This ability to add storage without incurring downtime is obviously a significant advantage when high-availability applications are involved.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
CHKDSK is a most time consuming and a most necessary command in server management. Thanks to ReFS and Storage features, its just a matter of seconds in Server 2012 compared to minutes / hours in earlier windows versions.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ReFS is not a replacement for NTFS as ReFS is not suitable for booting, and a NTFS storage cannot be formatted as ReFS. We can say, its a Catalyst for better stability and performance of NTFS in Server 2012.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Reason 2: Hyper-V 3.0 (Viridian)&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Hyper-V is a break through for Microsoft in market of VMWare / Virtual machines, using which virtual machine hosting can be done. Many new features has been introduced in Server 2008 and then enhanced with Server 2008 R2. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
But Server 2012 raised the bar very high by&amp;nbsp;pushing the limits to 4TB of max RAM per host, 320 logical processors per host, 64 nodes per cluster, 8,000 virtual machines per cluster, and up to 1,024 powered-on virtual machines per host.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Other new features include a new virtual switch and virtual SAN(StarWind Native). The virtual SAN includes a virtual Fibre Channel capability to connect a VM directly to a physical host bus adapter (HBA) for improved performance.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
One of the most significant improvements in Hyper-V 3.0 has to be in the area of live migration. This feature supports both the migration of the virtual machine and the underlying storage. &lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Hyper-V Replica is a new capability in Hyper-V 3.0 providing an out-of-the-box failure recovery solution covering everything from an entire storage system down to a single virtual machine. Under the hood it delivers asynchronous, unlimited replication of virtual machines from one Hyper-V host to another without the need for storage arrays or other third-party tools. That's another cost savings, or cost avoidance, with a capability you get as a part of the OS.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Microsoft believes that Hyper-V 3.0 can handle any workload you want to throw at it, especially if it's a Microsoft application such as Exchange, SQL Server, or SharePoint. With that in mind, you will definitely save money on hardware by consolidating those types of applications onto a beefy server or cluster. And you don't have to purchase any VMware software to make it happen.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Reason 3: PowerShell 3.0 Integration&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
When you install Server 2012, you have 2 options, One with GUI and other is Server Core ( command based). I wondered how a sever can be maintained with out pretty face of GUI?&lt;/div&gt;
&lt;div&gt;
But, when an administrator can do anything and everything using 2,400 cmdlets. There are no Management tasks which cannot be done using PowerShell scripts like Workflow creations, time based - scheduled jobs creation, system management and what not.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
New&amp;nbsp;Active Directory Administrative Center, using which the PowerShell history can be maintained, and the exact same commands can be executed for repetative tasks. The commands can even be automated using ADAC.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
The idea of Server core is to deploy only the functionality necessary to implement your server roles and remove any and all extraneous code that could pose a potential risk to security or availability. The PowerShell Integrated Scripting Environment (ISE) in Windows Server 2012 is a tool for the development and testing of PowerShell scripts, in which intellisense is supported.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
You can filter through the long list of available cmdlets, then use the -WhatIF qualifier to see what the results of running a command would be without actually executing the command.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Reason 4: Clustering is Affordable now!&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Clustering is limited to only high availability systems like SQL server, due to the cost of the components and licences.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
But Server 2012 includes clusters in standard edition making "Continuous Availability" an affordable feature for any applications hosted on it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
A new feature called cluster-aware updating (CAU) allows you to perform patches and updates to running cluster nodes without interrupting or rebooting the cluster. Each node will receive an update, then restart, if necessary. That said, you'll definitely save on downtime and administration costs with the CAU feature.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
Previous versions of the OS had limitations for virtualizing Domain Controllers (DCs). This issue has totally gone away with Windows Server 2012. Hyper-V 3.0 now supports the cloning of virtualized Domain Controllers. You can also do a snapshot restoration of a DC to get back to a known state.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Reason 5: Data Deduplication&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Deduplication is a method of maintaining the snapshot backup files taken in comparison with primary system. This is been taken care by some licensed components and vendors until now, but this is a default out-of-box feature of server 2012.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Data compression can also be applied to further reduce the total storage footprint. All data processing is done in the background with a minimal impact to CPU and memory.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Note: Deduplication applies only for NTFS system.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Reason 6: SMB 3.0&lt;/b&gt;&lt;/div&gt;
The Server Message Block (SMB) protocol has been significantly improved in Windows Server 2012 and Windows 8. The new version of SMB supports new file server features, such as SMB transparent failover , SMB Scale Out, SMB Multichannel, SMB Direct, SMB encryption, VSS for SMB file sharing, SMB directory leasing, and SMB PowerShell.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For Detailed feature list of SMB features please follow &lt;a href="http://blog.credera.com/topic/technology-solutions/microsoft-solutions/seven-new-features-in-windows-server-2012-introducing-smb-3-0/" target="_blank"&gt;Link&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
SMB 3.0 includes a number of new components to improve its ability to detect and recover from a lost connection. In the past this relied on a TCP/IP timeout that would typically take up to 20 seconds. SMB transparent failover utilizes a new feature called the Witness service to detect connection failures, then redirect the client to another node.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Reason 7: Scalability&lt;/b&gt;&lt;/div&gt;
One of the problems of building systems to meet a specific workload is what to do when you run out of capacity. This can be particularly bothersome when it comes to a storage system with high availability requirements.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
But, with combination of Storage Spaces and Clustering support of server 2012,&amp;nbsp;this can be accomplished without taking a server offline. At a minimum you could take individual nodes in a cluster down without taking the entire cluster offline.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Reason 8: Server Manager&lt;/b&gt;&lt;/div&gt;
Speaking of Server Manager, even many of those who dislike the new tile-based interface overall have admitted that the design’s implementation in the new Server Manager is excellent.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
One of the nicest things about the new Server Manager is the multi-server capabilities, which makes it easy to deploy roles and features remotely to physical and virtual servers. It’s easy to create a server group — a collection of servers that can be managed together. The remote administration improvements let you provision servers without having to make an RDP connection.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Reason 9: DAC - Dynamic Access Control&lt;/b&gt;&lt;/div&gt;
Dynamic Access Control (DAC) feature that helps administrators create a more centralized security model for accessing files and folders. With DAC, you can establish policies for controlling file access that are applied across the entire domain to all file servers.&lt;/div&gt;
&lt;div&gt;
DAC leverages Windows Server 2012’s improved file-level auditing and authentication to tag files based on criteria such as content and creator. &lt;br /&gt;
&lt;br /&gt;
Tagging and categorizing data is already familiar from Windows Server 2008, but Windows Server 2012 takes it to the next level. DAC is based on the new concept of claims-based access, taking the security to a very granular levels.&lt;/div&gt;
&lt;br /&gt;
Is it helpful for you? Kindly let me know your comments / Questions.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/0B0xUAnxUNQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/3356054443711290020/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/02/why-server-2012.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/3356054443711290020?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/3356054443711290020?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/0B0xUAnxUNQ/why-server-2012.html" title="Why Server 2012 ?" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/02/why-server-2012.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQEQH4zeCp7ImA9WhBXFk4.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-8110325610483135304</id><published>2013-01-17T22:50:00.002-08:00</published><updated>2013-03-30T02:38:21.080-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-30T02:38:21.080-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>PowerShell - Wait for Retract / Uninstall before Remove</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
This is a very small tip for SharePoint developers. Basically people hate PowerShell before knowing it. But you will love it once you start using it. Sooooo Comfortable.&lt;br /&gt;
&lt;br /&gt;
So, as a part of PowerShell commands, we have&lt;strong&gt; UnInstall-SPSolution&lt;/strong&gt; command for retracting a SharePoint solution and &lt;strong&gt;Remove-SPSolution&lt;/strong&gt; command to remove the solution from any scope.&lt;br /&gt;
&lt;br /&gt;
When you execute these commands in a sequence in a script (.ps1) file, Usually we end up with an error saying&lt;br /&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;em&gt;&lt;span style="color: red;"&gt;Remove-SPSolution : The solution "XXXX.wsp" has been deployed in the farm. Please retract the deployment before removing the solution.You can also use the &lt;br /&gt;-override parameter to forcibly remove the solution, but you will not be able to retract the solution deployment.&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-Elfsb0j6uqE/UPjt5SVTBDI/AAAAAAAACzc/VMHJI6NjoH4/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-Elfsb0j6uqE/UPjt5SVTBDI/AAAAAAAACzc/VMHJI6NjoH4/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;So we need to wait until the retraction / uninstallation is completed, to remove solution. But how we can wait in Automated scripts (.ps1) files.&lt;br /&gt;
&lt;br /&gt;
Below is the way to wait . . .&lt;br /&gt;
&lt;br /&gt;
I have 3 SharePoint solutions deployed to farm and I want a single script file which can uninstall and remove the solutions. Look at below PowerShell script.&lt;br /&gt;
&lt;pre&gt;add-pssnapin "microsoft.sharepoint.powershell"
Set-ExecutionPolicy unrestricted
echo " "
echo "Uninstalling Project1"
&lt;yellow&gt;$sln = get-spsolution -identity SharepointProject1.wsp &lt;/yellow&gt;
uninstall-spsolution -identity SharepointProject1.wsp -confirm:$false
echo "Started solution retraction..." 
&lt;yellow&gt;while($sln.JobExists) { &lt;/yellow&gt;
&lt;yellow&gt;echo " &amp;gt; Uninstall in progress..."&lt;/yellow&gt;
&lt;yellow&gt;start-sleep -s 10 &lt;/yellow&gt;
&lt;yellow&gt;}&lt;/yellow&gt;
remove-spsolution -identity SharepointProject1.wsp -confirm:$false
echo "Removed Project1"
echo "&amp;nbsp; "
echo "Uninstalling Project2"
&lt;yellow&gt;$sln = get-spsolution -identity SharepointProject2.wsp &lt;/yellow&gt;
uninstall-spsolution -identity SharepointProject2.wsp -confirm:$false
echo "Started solution retraction..." 
&lt;yellow&gt;while($sln.JobExists) { &lt;/yellow&gt;
&lt;yellow&gt;echo " &amp;gt; Uninstall in progress..." &lt;/yellow&gt;
&lt;yellow&gt;start-sleep -s 10&lt;/yellow&gt;
&lt;yellow&gt;}&lt;/yellow&gt; 
remove-spsolution -identity SharepointProject2.wsp -confirm:$false
echo "Removed Project2"
echo "&amp;nbsp; "
echo "Uninstalling Project3"
&lt;yellow&gt;$sln = get-spsolution -identity SharepointProject3.wsp&lt;/yellow&gt;
uninstall-spsolution -identity SharepointProject3.wsp -confirm:$false
echo "Started solution retraction..." 
&lt;yellow&gt;while($sln.JobExists) { &lt;/yellow&gt;
&lt;yellow&gt;echo " &amp;gt; Uninstall in progress..." &lt;/yellow&gt;
&lt;yellow&gt;start-sleep -s 10 &lt;/yellow&gt;
&lt;yellow&gt;}&lt;/yellow&gt; 
remove-spsolution -identity SharepointProject3.wsp -confirm:$false
echo "Removed Project3"
&lt;/pre&gt;
&lt;br /&gt;
Now here is the output.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-1ttFova-T_U/UPjv6gEVJJI/AAAAAAAAC0U/NOWKb2QABe0/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="332" src="http://4.bp.blogspot.com/-1ttFova-T_U/UPjv6gEVJJI/AAAAAAAAC0U/NOWKb2QABe0/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Task Accomplished.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/eXMIlrMqxJc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/8110325610483135304/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/01/powershell-wait-for-retract-uninstall.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/8110325610483135304?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/8110325610483135304?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/eXMIlrMqxJc/powershell-wait-for-retract-uninstall.html" title="PowerShell - Wait for Retract / Uninstall before Remove" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-Elfsb0j6uqE/UPjt5SVTBDI/AAAAAAAACzc/VMHJI6NjoH4/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/01/powershell-wait-for-retract-uninstall.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMBRX08fip7ImA9WhNUF0s.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-753346804292662418</id><published>2013-01-09T01:04:00.000-08:00</published><updated>2013-01-09T12:30:54.376-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-09T12:30:54.376-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>JSLink - Custom JS Rendering in Sharepoint 2013</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt; &lt;strong&gt;JSLink&lt;/strong&gt; is the new feature introduced in SharePoint 2013, loading off the burden of XSLT webparts from developer's mind. &lt;br /&gt;
Lets me show you an example. I have two lists "Movies" and "Books".&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-AufNo3DNOyU/UO0bEl9qVjI/AAAAAAAACqU/1S7R6K3ctIE/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/-AufNo3DNOyU/UO0bEl9qVjI/AAAAAAAACqU/1S7R6K3ctIE/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
But I want to display them on a page like&amp;nbsp; . . .&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-YBCiW_CGGKU/UO0bwH8lfDI/AAAAAAAACqc/5jovsolWVI8/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="359" src="http://2.bp.blogspot.com/-YBCiW_CGGKU/UO0bwH8lfDI/AAAAAAAACqc/5jovsolWVI8/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
All this can be done just by using Java script and without creating a single webpart. &lt;br /&gt;
Lets see how to accomplish this task.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt;&amp;nbsp; &lt;br /&gt;
Create an empty SharePoint project. Follow the steps mentioned in below image to create basic infrastructure. &lt;br /&gt;
Create all the required site columns. If you are not clear on this task, you can see Elements.xml file under "&lt;strong&gt;BookSiteColumns&lt;/strong&gt;" from&amp;nbsp;my sample code embedded below.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-BYmbKWcHoz0/UO0frJgnBYI/AAAAAAAACsM/vfduuU5gEM8/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="308" src="http://3.bp.blogspot.com/-BYmbKWcHoz0/UO0frJgnBYI/AAAAAAAACsM/vfduuU5gEM8/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
While creating content types, visual studio will display all the available fields (Existing in site + New ones you just created in this project). Select required fields to create the Content type.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-bsiwBpsruLA/UO0gtezY8BI/AAAAAAAACsY/DRiNEaDPABU/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="340" src="http://3.bp.blogspot.com/-bsiwBpsruLA/UO0gtezY8BI/AAAAAAAACsY/DRiNEaDPABU/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
once Content types are created, now create a list as shown below, and then you can associate the required content type.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-xciRKQDSwdg/UO0hyNd0sBI/AAAAAAAACtY/SYuEaemnc1M/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="312" src="http://3.bp.blogspot.com/-xciRKQDSwdg/UO0hyNd0sBI/AAAAAAAACtY/SYuEaemnc1M/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Associating the newly created content types.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-511QhJT9h5M/UO0ieVXMJJI/AAAAAAAACuE/im-zeDATalE/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="470" src="http://2.bp.blogspot.com/-511QhJT9h5M/UO0ieVXMJJI/AAAAAAAACuE/im-zeDATalE/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
With this we created the required, Fields, Content Types and Lists.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;br /&gt;
Go to Movies List in VS2012&amp;nbsp;, and expand it.&amp;nbsp; First understand what we have here.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-9iGvN6GneHc/UO0j6M_B9yI/AAAAAAAACu8/9I4fuqBqKTc/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="168" src="http://4.bp.blogspot.com/-9iGvN6GneHc/UO0j6M_B9yI/AAAAAAAACu8/9I4fuqBqKTc/s320/7.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;Elements.xml&lt;/strong&gt; under MoviesInstance node&amp;nbsp;will talk about the default data that can be populated in to movies list while deployment.&lt;br /&gt;
&lt;strong&gt;Elements.xml &lt;/strong&gt;under Movies node will contain the definition of List like Name, template Type, Display name , etc.&lt;br /&gt;
&lt;strong&gt;Schema.xml&lt;/strong&gt; under Movies node will have the detail of all the ContentTypes associated and Views available, and what fields will be displayed in each view.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 3:&lt;/strong&gt;&lt;br /&gt;
By this time, you might have understood that we need to modify Schema.xml.&lt;br /&gt;
By default there will be&amp;nbsp;couple Views available in schema file. Now I will create definition of a new View and add it in &amp;lt;Views&amp;gt;&amp;lt;/Views&amp;gt; section of schema.&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;View BaseViewID="2" Name="96E9EE4D-FCE6-44C3-A46B-434326DDAD6C" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DisplayName="CustomJSRendering" Type="HTML" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebPartZoneID="Main" SetupPath="Pages\ViewPage.aspx" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="CustomJSRendering.aspx" DefaultView="TRUE"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ViewFields&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="Movie"&amp;nbsp; DisplayName="Movie Name"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="PopularityPercent" DisplayName="Popularity"/&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ViewFields&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Query /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Toolbar Type="Standard" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;XslLink&amp;gt;main.xsl&amp;lt;/XslLink&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;yellow&gt;&amp;lt;JSLink Default="TRUE"&amp;gt;CustomJSRendering1.js&amp;lt;/JSLink&amp;gt;&lt;/yellow&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/View&amp;gt;
&lt;/pre&gt;
Here we need to stress on a few important things. Url part of definition, you dint have any page with name "CustomJSRendering.aspx", but framework will take "Pages\ViewPage.aspx" page and mock it up with the definition&amp;nbsp;and will render&amp;nbsp;with&amp;nbsp;name as "CustomJSRendering.aspx".&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 4:&lt;/strong&gt;&lt;br /&gt;
The definition says about the Name, ID, Url, Fields to be displayed. Now look at &amp;lt;JSLink&amp;gt; tag highlighted above. This says sharepoint that the way of rendering this View will be controlled by "&lt;strong&gt;CustomJSRedering1.js&lt;/strong&gt;" file. &lt;br /&gt;
Now look at both the views of Movies list on top. I want to modify just the "PopularityPercent" field to display some colors based on the Values.&lt;br /&gt;
For that below is the JS content.&lt;br /&gt;
&lt;pre&gt;(function () {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var overrideContext = {};
&amp;nbsp;&amp;nbsp;&amp;nbsp; overrideContext.BaseViewID = 2;
&amp;nbsp;&amp;nbsp;&amp;nbsp; overrideContext.ListTemplateType = 10001;
&amp;nbsp;&amp;nbsp;&amp;nbsp; overrideContext.Templates = {};
&amp;nbsp;&amp;nbsp;&amp;nbsp; overrideContext.Templates.Header = "&amp;lt;h2&amp;gt;My Custom Rendering Movies View&amp;lt;/h2&amp;gt;";
&amp;nbsp;&amp;nbsp;&amp;nbsp; overrideContext.Templates.Fields = { 'PopularityPercent': { 'View': PopularityViewTemplate } };
&amp;nbsp;&amp;nbsp;&amp;nbsp; SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideContext);
})();
function PopularityViewTemplate(ctx) { 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var popularity = ctx.CurrentItem[ctx.CurrentFieldSchema.Name];
&amp;nbsp;&amp;nbsp;&amp;nbsp; var color = getColor(popularity);
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;span style='background-color : " + color + "' &amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;amp;nbsp;" + popularity + "%";
}
function getColor(pop) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (parseInt(pop) &amp;gt; 70)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Green";
&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (parseInt(pop) &amp;gt; 40)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Yellow";
&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (parseInt(pop) &amp;gt; 20)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Orange";
&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Red";
}
&lt;/pre&gt;
You can specify as &lt;strong&gt;&amp;lt;JSLink&amp;gt;~/Scripts/xxxxxx.js&amp;lt;/JSLink&amp;gt;&lt;/strong&gt; if you intend to deploy it in your VD. But sometimes sharepoint won't recognize the Script files. In that case you can simple mention as &lt;strong&gt;&amp;lt;JSLink&amp;gt;xxxxxx.js&amp;lt;/JSLink&amp;gt; &lt;/strong&gt;and deploy the script file to "15/Templates/Layouts".&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;OutPut:&lt;/strong&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-t0KGCvcClh4/UO0rKj5l34I/AAAAAAAACv0/s2zBeHwaOKE/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="510" src="http://4.bp.blogspot.com/-t0KGCvcClh4/UO0rKj5l34I/AAAAAAAACv0/s2zBeHwaOKE/s640/8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;Note: &lt;/strong&gt;If you wish to see the &lt;strong&gt;AllItems&lt;/strong&gt; View of this list, simply go to URL and change the &lt;strong&gt;CustomJSRendering.aspx&lt;/strong&gt; to &lt;strong&gt;AllItems.aspx&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 5:&lt;/strong&gt;&lt;br /&gt;
We have modified the rendering of a single field using &amp;lt;JSLink&amp;gt;. Now I want to modify complete View of Book List.&lt;br /&gt;
Again same steps, define a new View in Schema.xml file under Books List&amp;nbsp;node.&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;View BaseViewID="2" Name="08B44EC8-7DC9-4C63-B43A-D867B869F625" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DisplayName="CustomJSRendering" Type="HTML" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebPartZoneID="Main" SetupPath="Pages\ViewPage.aspx" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="CustomJSRendering.aspx" DefaultView="TRUE"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ViewFields&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="BookName" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="BookAuthor" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="AuthorCountry" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ViewFields&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Query /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Toolbar Type="Standard" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;XslLink&amp;gt;main.xsl&amp;lt;/XslLink&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;JSLink Default="TRUE"&amp;gt;CustomJSRendering.js&amp;lt;/JSLink&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/View&amp;gt;
&lt;/pre&gt;
I will define how I want to render the view inside CustomJSRender.js file.&lt;br /&gt;
&lt;pre&gt;(function () {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var overrideContext = {};
&amp;nbsp;&amp;nbsp;&amp;nbsp; overrideContext.BaseViewID = 2;
&amp;nbsp;&amp;nbsp;&amp;nbsp; overrideContext.ListTemplateType = 10000;
&amp;nbsp;&amp;nbsp;&amp;nbsp; overrideContext.Templates = {};
&amp;nbsp;&amp;nbsp;&amp;nbsp; overrideContext.Templates.Header = "&amp;lt;h2&amp;gt;My Custom Rendering Books View&amp;lt;/h2&amp;gt;";
&amp;nbsp;&amp;nbsp;&amp;nbsp; overrideContext.Templates.Item = customItem;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideContext);
})();
function customItem(ctx) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var ItemStyle = "display:inline-block;width:200px;height:120px;" +
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "border:2px black solid;background-color:#ffe;padding-top:20px;" +
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "padding-left:20px;color:black;text-align:center;font-size:12px";
&amp;nbsp;&amp;nbsp;&amp;nbsp; var ItemHTML = "&amp;lt;div style='" + ItemStyle + "'&amp;gt;&amp;lt;h2&amp;gt;"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + ctx.CurrentItem.BookName + "&amp;lt;/h2&amp;gt;" +
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;em&amp;gt;" + ctx.CurrentItem.BookAuthor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + "&amp;lt;/em&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;em&amp;gt;&amp;lt;b&amp;gt;" + ctx.CurrentItem.AuthorCountry + "&amp;lt;/b&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/div&amp;gt;";
&amp;nbsp;&amp;nbsp;&amp;nbsp; return ItemHTML;
}
&lt;/pre&gt;
Here is the output.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-ypWlaCQdrzQ/UO0uma2s1EI/AAAAAAAACws/XlXDIpwptp8/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="246" src="http://2.bp.blogspot.com/-ypWlaCQdrzQ/UO0uma2s1EI/AAAAAAAACws/XlXDIpwptp8/s640/9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;Step 6: &lt;/strong&gt;&lt;br /&gt;
Now this is really an interesting part, when I want to display these lists on a Site Page, I just need to insert these Lists using Insert section in Edit mode of a Site page.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-HNGNUpFHmRQ/UO0vcQVMqSI/AAAAAAAACw4/XV8Cdzx8Mxg/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="330" src="http://1.bp.blogspot.com/-HNGNUpFHmRQ/UO0vcQVMqSI/AAAAAAAACw4/XV8Cdzx8Mxg/s640/10.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Once I insert both the Lists on Site page and save and view it in browse mode. The lists will be shown as we intended&amp;nbsp;and designed, thanks to&amp;nbsp;&amp;lt;JSLink&amp;gt;.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-QiVOcMtXFRY/UO0waaUi8jI/AAAAAAAACxw/JuDmxV_0agE/s1600/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="292" src="http://4.bp.blogspot.com/-QiVOcMtXFRY/UO0waaUi8jI/AAAAAAAACxw/JuDmxV_0agE/s640/12.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Sample Code :&lt;/b&gt;&amp;nbsp; Download "SP13CustomViewRendering.Zip" from my &lt;a href="https://skydrive.live.com/?cid=56F6D80369352266&amp;amp;id=56F6D80369352266%21103" target="_blank"&gt;codebase library&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
We have created a customized view for custom lists, with using new SharePoint 2013&amp;nbsp;feature &amp;lt;JSLink&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Is it helpful for you? Kindly let me know your comments / Questions. &lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/KpaiBW_XT4c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/753346804292662418/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2013/01/jslink-custom-js-rendering-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/753346804292662418?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/753346804292662418?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/KpaiBW_XT4c/jslink-custom-js-rendering-in.html" title="JSLink - Custom JS Rendering in Sharepoint 2013" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-AufNo3DNOyU/UO0bEl9qVjI/AAAAAAAACqU/1S7R6K3ctIE/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2013/01/jslink-custom-js-rendering-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUAQn0ycCp7ImA9WhNVFks.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-1481546578382865531</id><published>2012-12-27T19:44:00.001-08:00</published><updated>2012-12-27T20:00:43.398-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-27T20:00:43.398-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Sharepoint 2013 - Avoiding Azure on Dev Box</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Let us have a look at this error.&lt;br /&gt;
&lt;span style="color: red; font-size: large;"&gt;" The parameter 'token' cannot be a null or empty string "&lt;/span&gt;&lt;br /&gt;
or&lt;br /&gt;
&lt;span style="color: red; font-size: large;"&gt;"&amp;nbsp;Microsoft.SharePoint.SPException: The Azure Access Control service is unavailable "&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We might have encountered these issues in initial days of working with Apps.&lt;br /&gt;
To be specific, this happens with Auto Hosted or Provider Hosted&amp;nbsp;SharePoint Apps.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
In both of these kind, the TokenHelper class will try to access&amp;nbsp;your Azure Security Principle by default.&lt;br /&gt;
Means, if you installed Office 365, you will have a MS Account associated, which by default will be associated to an Azure account within. Thus the Azure security principal will be captured and WebSecurityToken will be generated.&lt;br /&gt;
&lt;br /&gt;
Problem is, either you might have installed Office 2013 or you don't have a valid Azure account on your Development machine. In that scenario, you will encounter this issue.&lt;br /&gt;
&lt;br /&gt;
So, I cannot tell you how to resolve this issue, because it will be resolved with a valid Azure account which most of us cannot afford to have on our Development machines.&lt;br /&gt;
&lt;br /&gt;
So, lets avoid it.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt;&amp;nbsp; If you named your App as "XXXX", then the Web application will be created with name "XXXXWeb". So go to properties of "XXXXWeb" and change the SSLEnabled to false.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt;&amp;nbsp; Go to "XXXX" and right click on AppManifest.Xml and select "View Code".&lt;br /&gt;
Replace the tag as shown below.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-loFRgYZhOqQ/UN0TMzXipbI/AAAAAAAACok/fSL7Eui4NrE/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://4.bp.blogspot.com/-loFRgYZhOqQ/UN0TMzXipbI/AAAAAAAACok/fSL7Eui4NrE/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Replacing the AppPrincipal with internal, signifies that we are not going to use Azure Platform for hosting so, the App can use internal Windows authentication, instead of Azure Access Control Service.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 3:&lt;/strong&gt;&amp;nbsp; Go to "XXXXWeb" project and open Default.aspx.cs file and comment out the default code provided in Page_Load method.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-dW2UpW1d960/UN0UDoI1dqI/AAAAAAAACow/Xz9QKX5TNE4/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="282" src="http://2.bp.blogspot.com/-dW2UpW1d960/UN0UDoI1dqI/AAAAAAAACow/Xz9QKX5TNE4/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now, you can deploy the Provider Hosted/ Auto Hosted Apps in your local dev box. The Web application will be deployed&amp;nbsp;in different location from your SharePoint Farm, and you can host the App in your SharePoint site.&lt;br /&gt;
&amp;nbsp;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/S1lObsUu8rc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/1481546578382865531/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/12/sharepoint-2013-avoiding-azure-on-dev.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/1481546578382865531?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/1481546578382865531?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/S1lObsUu8rc/sharepoint-2013-avoiding-azure-on-dev.html" title="Sharepoint 2013 - Avoiding Azure on Dev Box" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-loFRgYZhOqQ/UN0TMzXipbI/AAAAAAAACok/fSL7Eui4NrE/s72-c/2.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/12/sharepoint-2013-avoiding-azure-on-dev.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08CQXs8eip7ImA9WhNUF0s.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-271772527548832753</id><published>2012-12-22T23:50:00.001-08:00</published><updated>2013-01-09T12:04:20.572-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-09T12:04:20.572-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>My First Sharepoint-Hosted App in 2013</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt; I would recommend to read &lt;a href="http://pratapreddypilaka.blogspot.co.nz/2012/12/apps-in-sharepoint-2013.html" target="_blank"&gt;Apps in SharePoint 2013&lt;/a&gt; post before going through this one.&lt;br /&gt;
I want to create a SharePoint-Hosted App in 2013 using Visual Studio.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-_JzeoBOQ2WE/UNaS7XSHVWI/AAAAAAAACcM/IACH7yv50a0/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="165" src="http://4.bp.blogspot.com/-_JzeoBOQ2WE/UNaS7XSHVWI/AAAAAAAACcM/IACH7yv50a0/s400/1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
I have created a SharePoint 2013 machine with all required software.&lt;br /&gt;
Just as a best practice, even if you are creating a standalone server,&amp;nbsp;enable Active Directory Domain Services.&lt;br /&gt;
&lt;strong&gt;SharePoint 2013 works better when the system is in a Domain, rather than in a workgroup.&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
So, I have installed Windows server 2012, enabled all required features. Installed Office 2013, SharePoint 2013, Visual Studio 2012 and Developer tools for SharePoint 2013.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
We will create an &lt;strong&gt;"App for SharePoint"&lt;/strong&gt; and try to understand the scaffold code and try to deploy it and see what can happen.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 1: &lt;/strong&gt;Open Visual studio and select "App for SharePoint".&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-lcFgf3Sj0UE/UNaXQ9oRzrI/AAAAAAAACdA/WcqmPrC777U/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="406" src="http://4.bp.blogspot.com/-lcFgf3Sj0UE/UNaXQ9oRzrI/AAAAAAAACdA/WcqmPrC777U/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Provide required data. While selecting the hosting option, remember to select the hosting option as "SharePoint-Hosted". You can select Auto-Hosted if you want to deploy your App to Windows Azure. Provider-Hosted if you want to deploy the App to any other hosting Providers.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Q15nuofOmCE/UNaYnx3hNsI/AAAAAAAACdU/rSwgfN2Bmko/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="466" src="http://3.bp.blogspot.com/-Q15nuofOmCE/UNaYnx3hNsI/AAAAAAAACdU/rSwgfN2Bmko/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;Step 2: &lt;/strong&gt;Default "App" code is created and lets have a look at its content.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-Zkrk6UdRprQ/UNaaXqw5KKI/AAAAAAAACew/01q0gWxxs-4/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-Zkrk6UdRprQ/UNaaXqw5KKI/AAAAAAAACew/01q0gWxxs-4/s320/4.png" width="256" /&gt;&lt;/a&gt;&lt;/div&gt;
Project is created with a Default.aspx page and few script files and configuration files. First thing we need to know is about &lt;strong&gt;"Default.aspx" &lt;/strong&gt;page. We already read that every SP-Hosted&amp;nbsp;App we Install/Deploy will be created as a Subweb under SP Web application. That Subweb will be defaulted to this specific page. When user click on the App, he will be navigated to this page first. If you want to rename the page, or set different page as start page, modify Manifest.XML to achieve it.&lt;br /&gt;
Lets see the content of the file now.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 3: &lt;/strong&gt;I have attached the snapshot of the "Default.aspx" file and see what is the significance of each part.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-rAnWSapf2_Y/UNahWAlNvHI/AAAAAAAACfk/yQChkgfDcQ0/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="316" src="http://3.bp.blogspot.com/-rAnWSapf2_Y/UNahWAlNvHI/AAAAAAAACfk/yQChkgfDcQ0/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The first highlighted box refers to the Framework provided&amp;nbsp;JavaScript libraries.&amp;nbsp;As we will be using Client Side Object Model(CSOM),&amp;nbsp;these Jscript libraries will provide the necessary&amp;nbsp;support while execution of our&amp;nbsp;custom code.&lt;br /&gt;
&lt;br /&gt;
Second&amp;nbsp;highlighted box refers to the local script file pertaining to this specific app. We will see in detail about this in&amp;nbsp;next step.&lt;br /&gt;
&lt;br /&gt;
Third one is the sample code I added. We will not be doing extensive coding right now. The objective is to see if there are any hurdles in deploying an App.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 4&lt;/strong&gt;: Open App.js file under scripts.&amp;nbsp;This file content is responsible for Loading the Context and Web information in which the App is running. Look at the code and its almost&amp;nbsp;self explanatory.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-oDq3Q_c6xnc/UNalNjmfs8I/AAAAAAAACgY/_4ptq3v06k8/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="306" src="http://1.bp.blogspot.com/-oDq3Q_c6xnc/UNalNjmfs8I/AAAAAAAACgY/_4ptq3v06k8/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;Step 5: &lt;/strong&gt;Now I tried to deploy the App. First things to ensure are that App Management service and Site Subscription Services are enabled in Service Applications section on Central Admin. Now Deploy. . .&lt;br /&gt;
Oops, got an error.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: red;"&gt;" Error occurred in deployment step 'Install app for SharePoint': Failed to install app for SharePoint. Please see the output window for details."&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Ok, looked at Output window found another reason.&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp;&lt;span style="color: red;"&gt;" ErrorDetail: Apps are disabled on this site.&amp;nbsp;"&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
Now we need to remember what we learned in prior post.&amp;nbsp; Any SharePoint-Hosted App will try to create a Subweb which will be executed in a separate AppDomain apart from SharePoint Farm.&lt;br /&gt;
Currently SharePoint dint have any clue on where to&amp;nbsp;Host this app code and what to do with it.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 6&lt;/strong&gt;: We need to create a new App Domain, and register it with SharePoint. So next time when you deploy an App, it know where to&amp;nbsp;host it.&lt;br /&gt;
I created my machine on a&amp;nbsp;Domain "Sharepoint13.com". So I would like to create an App Domain "Sharepoint13Apps.com" for hosting purpose. For that go to &lt;br /&gt;
Administrative Tools &amp;gt; DNS &amp;gt; following window will b opened showing the Machine Name and the current App Domain in which SharePoint farm is executing.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-ciQcYf_F3Pw/UNapPIDmerI/AAAAAAAAChM/Wfjg6-M0QDo/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/-ciQcYf_F3Pw/UNapPIDmerI/AAAAAAAAChM/Wfjg6-M0QDo/s320/7.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Right click on Forward Lookup Zone and Click on&lt;br /&gt;
"New Zone" &amp;gt; "Next" &amp;gt; "Next" &amp;gt; "Next" &amp;gt; following window will open.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-PP6AeUZrCB8/UNapzKy3odI/AAAAAAAAChU/z8nF-ZnuURY/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="311" src="http://3.bp.blogspot.com/-PP6AeUZrCB8/UNapzKy3odI/AAAAAAAAChU/z8nF-ZnuURY/s400/8.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
Now the new AppDomain is created,&amp;nbsp;Now we will create a wildcard Alias (CNAME) record to allow apps to create unique domain names within our app domain, &lt;strong&gt;Sharepoint13Apps.com&lt;/strong&gt;. Right-click &lt;strong&gt;Sharepoint13Apps.com &lt;/strong&gt;and select &lt;strong&gt;Refresh&lt;/strong&gt;. Then right-click &lt;strong&gt;Sharepoint13Apps.com &lt;/strong&gt;and select &lt;strong&gt;New Alias (CNAME)…&lt;/strong&gt;&lt;br /&gt;
Give the values as I have shown and Click OK.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-1cY8d4FUox8/UNasnZwBnuI/AAAAAAAACjE/0TlQj9KOEPc/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-1cY8d4FUox8/UNasnZwBnuI/AAAAAAAACjE/0TlQj9KOEPc/s400/9.png" width="357" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Now App Domain is created, lets test it now. Open CMD window and try pinging to "abc.Sharepoint13Apps.com". . . Successfully done.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-8zND3jt5TGw/UNas_LEl_sI/AAAAAAAACjM/lKqtetdSJls/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="323" src="http://2.bp.blogspot.com/-8zND3jt5TGw/UNas_LEl_sI/AAAAAAAACjM/lKqtetdSJls/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;Step 7: &lt;/strong&gt;We need to register this newly created app domain with SharePoint. Go to Central admin, click on Apps on right menu.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-AZ_B2UQCwu8/UNat7zdYoVI/AAAAAAAACjY/Rj1NxqUoLVw/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="156" src="http://2.bp.blogspot.com/-AZ_B2UQCwu8/UNat7zdYoVI/AAAAAAAACjY/Rj1NxqUoLVw/s400/2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
it will give you a message saying&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: red;"&gt;"&lt;span class="ms-listheaderlabel" id="ctl00_PlaceHolderMain_ConfigureAppSettingsMessageLabel"&gt;The Subscription Settings service and corresponding application and proxy needs to be running in order to make changes to these settings.&lt;/span&gt; "&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
This means a new service application running in its own app pool needs to be created and up and running.&lt;br /&gt;
Lets create a Managed account with Machine admin credentials. Mine is &lt;br /&gt;
&lt;strong&gt;"Sharepoint13\Administrator".&lt;/strong&gt;&lt;br /&gt;
Open the PowerShell window and execute below script.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;add-pssnapin "Microsoft.Sharepoint.Powershell"
$account = Get-SPManagedAccount sharepoint13\administratorRemove-SPServiceApplicationPool 
-Identity SettingsServiceAppPool
$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account 
$account$appSubSvc = New-SPSubscriptionSettingsServiceApplication 
-ApplicationPool $appPoolSubSvc -Name SettingsServiceApp -DatabaseName SettingsServiceDB
$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy 
-ServiceApplication $appSubSvc 
&lt;/pre&gt;
&lt;br /&gt;
It may prompt you once, say Yes.&lt;br /&gt;
Some times the above script may give error&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: red;"&gt;"Access denied. Only machine administrators are allowed to create administration service job definitions"&lt;/span&gt;&lt;/strong&gt; &lt;br /&gt;
Go to "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\CONFIG\POWERSHELL\Registration" and execute SharePoint.ps1 as Administrator.&lt;br /&gt;
Issue will be resolved.&lt;br /&gt;
&lt;br /&gt;
Once this script is successfully executed. We have created a new service Application, and its proxy which will run under its own Service App Pool. To verify this go to &lt;br /&gt;
Central Admin &amp;gt; Service Applications &amp;gt; Manage Service Applications &amp;gt; you can see below Svc application created , up and running.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-19AbBhjAleY/UNaymcg7QbI/AAAAAAAACk8/O2gEYEYDHcM/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="120" src="http://1.bp.blogspot.com/-19AbBhjAleY/UNaymcg7QbI/AAAAAAAACk8/O2gEYEYDHcM/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;Step 8: &lt;/strong&gt;Now go to Central Admin &amp;gt; Apps &amp;gt; Configure App URLs&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-VBlP-MnXnlQ/UNazQ2mEmKI/AAAAAAAAClE/hjsNweJAbVM/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="374" src="http://2.bp.blogspot.com/-VBlP-MnXnlQ/UNazQ2mEmKI/AAAAAAAAClE/hjsNweJAbVM/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You can see that the new App Domain we created automatically populated here, just mention app prefix as "Apps" and say OK.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;We are all set&amp;nbsp;to deploy our&amp;nbsp;SharePoint-Hosted App&lt;/strong&gt;. Right click on Solution and say &lt;strong&gt;"Deploy"&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Once App is deployed successfully, go to SharePoint Application and click on &lt;strong&gt;"Site Actions" &lt;/strong&gt;the little gear symbol on top right and click on Site Content. You can see your App there.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-hqVCBbePaj4/UNa0tEp9grI/AAAAAAAACl8/JzNq4-1Iztw/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="550" src="http://3.bp.blogspot.com/-hqVCBbePaj4/UNa0tEp9grI/AAAAAAAACl8/JzNq4-1Iztw/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Lastly we have to observe one more thing before closing this topic. Observe the url of site and the url of the App after loading.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-3-i9tR20pkI/UNa2iWVMy6I/AAAAAAAACm0/fkzhANByBew/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="128" src="http://2.bp.blogspot.com/-3-i9tR20pkI/UNa2iWVMy6I/AAAAAAAACm0/fkzhANByBew/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
We can see SharePoint-Hosted App&amp;nbsp;loaded in different App Domain thus causing no harm to Actual SharePoint Farm in any circumstances. &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: large;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Objective Achieved.&lt;/span&gt;&lt;/strong&gt; &lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Is it helpful for you? Kindly let me know your comments / Questions. &lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/XVr1O2oPpds" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/271772527548832753/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/12/my-first-sharepoint-hosted-app-in-2013.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/271772527548832753?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/271772527548832753?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/XVr1O2oPpds/my-first-sharepoint-hosted-app-in-2013.html" title="My First Sharepoint-Hosted App in 2013" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-_JzeoBOQ2WE/UNaS7XSHVWI/AAAAAAAACcM/IACH7yv50a0/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/12/my-first-sharepoint-hosted-app-in-2013.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUFRH45eip7ImA9WhNVEk4.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-651799297467002258</id><published>2012-12-22T20:07:00.000-08:00</published><updated>2012-12-22T20:33:35.022-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-22T20:33:35.022-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Apps in Sharepoint 2013</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;strong&gt;Why Apps? What's wrong with Solutions?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
The world is getting smaller day by day, thanks to technology. Big desktops became Bulky laptops. Bulky laptops became Notebooks. Notebooks became Ultra books. Now the trend is moving towards Tablets and Smart phones. &lt;br /&gt;
So does our applications. Web applications becoming Apps.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;"&lt;strong&gt;Apps&lt;/strong&gt;" is&amp;nbsp;not just a marketing strategy to increase use of SharePoint in wider markets, but also a complete replacement of sandbox approach&amp;nbsp;with many other Pros for both Development, Deployment&amp;nbsp;and Usage.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;strong&gt;Do you know that sandbox solutions are deprecated in 2013?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Sandbox Solutions are introduced in SP 2010 and now they are off, to encourage the usage of Apps.&amp;nbsp;May&amp;nbsp;be&amp;nbsp;we should understand the seriousness of Microsoft towards "Apps" in future. &lt;br /&gt;
&lt;strong&gt;Of- course the conventional SP solution approach&amp;nbsp;is still there.&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: large;"&gt;SP 2103 Development Options:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
1. Full-trust SharePoint Solutions (WSP)&lt;br /&gt;
2. Apps&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;strong&gt;Main reasons for "Apps" development:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
1. Custom code will not be executed on server. So&amp;nbsp;this can avoid, Application / Server outages.&lt;br /&gt;
2. Custom code will be executed in Client-Browser or may be in&amp;nbsp;some other&amp;nbsp;scope like IIS or Windows Azure, which is completely out of SharePoint scope.&lt;br /&gt;
3.&amp;nbsp;Server&amp;nbsp;Object Model (SOM)&amp;nbsp;code is replaced by Client&amp;nbsp;side object model (CSOM) / Rest Services using which Apps can communicate with Server. Authentication is done by OAuth.&lt;br /&gt;
4. Installing / Updating / Uninstalling of apps can be done without&amp;nbsp; affecting the SharePoint site.&lt;br /&gt;
5.&amp;nbsp;Better usability in&amp;nbsp;Tablets and Mobile devices.&lt;br /&gt;
6. Taking SharePoint to next level in terms of&amp;nbsp; Usability, Development, Deployment&amp;nbsp;&amp;nbsp;and &amp;nbsp;Hosting(cloud).&lt;br /&gt;
7. Finally, everything in SharePoint 2013 is an App. &lt;br /&gt;
&lt;br /&gt;
I know, the next question is &lt;br /&gt;
"&lt;strong&gt;Most of&amp;nbsp;these reasons are just sounding like reasons for Sandbox Solutions?&lt;/strong&gt;"&lt;br /&gt;
Well I have a question for you, how many times we have chosen sandbox solution for real-time implementation?&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;No full object model . . .&lt;/li&gt;
&lt;li&gt;Understanding of Sandbox architecture&lt;/li&gt;
&lt;li&gt;Not an easy task to create proxies for execution of full trust code.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
What ever may be the reason, real-time applications are tough to develop&amp;nbsp;using a&amp;nbsp;Sandbox solution.&lt;br /&gt;
That is why "Apps" are introduced in SharePoint 2013 for ease of development and deployment.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;strong&gt;Hosting Options in Apps:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;Provider-hosted&lt;/li&gt;
&lt;li&gt;&lt;div class="unordered"&gt;
Hosted in the cloud (Windows&amp;nbsp;Azure autohosted)&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class="unordered"&gt;
Hosted in a SharePoint environment&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class="unordered"&gt;
Several combinations of these options.&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-fx9WucYG4_8/UNZ9yFeNbgI/AAAAAAAACZw/4ZjI3QhtZoc/s1600/2.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="512" src="http://3.bp.blogspot.com/-fx9WucYG4_8/UNZ9yFeNbgI/AAAAAAAACZw/4ZjI3QhtZoc/s640/2.gif" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="unordered"&gt;
&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="font-size: large;"&gt;How Apps for Sharepoint&amp;nbsp;Work:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Cym3csiox1I/UNZ-4gwjwGI/AAAAAAAACZ8/nnMV1y56JBA/s1600/3.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="370" src="http://3.bp.blogspot.com/-Cym3csiox1I/UNZ-4gwjwGI/AAAAAAAACZ8/nnMV1y56JBA/s640/3.gif" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In above case, App1 is a Provider-hosted or a Cloud-Hosted(Auto-Hosted) app and App2 is a SharePoint Hosted App. So anything related to App1 will be created/Maintained in respective locations, either on Provider or Azure servers. This makes App1 safe and secure in execution perspective. &lt;br /&gt;
&lt;br /&gt;
Now we need to look at App2. &lt;br /&gt;
When you create/Imported/Added a SharePoint-Hosted App, it will create a separate sub-web under your SP Web application. This App will be executed in a separate App Domain different from Farm App Domain. So, as process runs under App Domains, any exceptions in Apps will not cause any Outage&amp;nbsp;to SharePoint Farm.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-pnXki_QwvYM/UNaCqwaQMNI/AAAAAAAACbY/t2EjC5dxpVk/s1600/5.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="168" src="http://4.bp.blogspot.com/-pnXki_QwvYM/UNaCqwaQMNI/AAAAAAAACbY/t2EjC5dxpVk/s640/5.gif" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
We will see&amp;nbsp;the creation of an SharePoint-Hosted App and&amp;nbsp;issues involved in doing so, in our next post.&amp;nbsp;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/x1IWIUzPIAA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/651799297467002258/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/12/apps-in-sharepoint-2013.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/651799297467002258?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/651799297467002258?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/x1IWIUzPIAA/apps-in-sharepoint-2013.html" title="Apps in Sharepoint 2013" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-fx9WucYG4_8/UNZ9yFeNbgI/AAAAAAAACZw/4ZjI3QhtZoc/s72-c/2.gif" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/12/apps-in-sharepoint-2013.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4FRHk7fSp7ImA9WhNVFkk.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-1784537697060208033</id><published>2012-12-15T04:13:00.001-08:00</published><updated>2012-12-27T13:31:55.705-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-27T13:31:55.705-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>SharePoint 2013 Issues Encountered</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
These are the list of issues I encounter while working on SP 2013 on VS 2012.&lt;br /&gt;
&lt;br /&gt;
While setting up SharePoint 2013 in standalone mode, there are 2 kinds of errors which we may encounter at step8.&lt;br /&gt;
Just like many people I ignored it and verified Central Admin and created an application. So thought everything is working. But when you create applications like apps, then you will start getting weird errors like &lt;b&gt;"xxxxxx component is missing, try installing it again"&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
So clear these issues first and then proceed.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-large;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Problem #1&lt;/span&gt;&lt;/blockquote&gt;
&lt;b&gt;Configuration Failed&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;One or more configurations settings failed.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Failed to create the configuration database.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;An exception of type System.Management.Automation.CmdletInvocationException was thrown. Additional exception information: ErrorCode&amp;lt;NonDomainNWService&amp;gt;:SubStatus&amp;lt;ES0001&amp;gt;:Service running under Network Service account in workgroup environment is not supported.&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-oYH0DI3UbH0/UMxmwfGCN3I/AAAAAAAACYg/ELjVZmX05p8/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="550" src="http://2.bp.blogspot.com/-oYH0DI3UbH0/UMxmwfGCN3I/AAAAAAAACYg/ELjVZmX05p8/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Resolution:&lt;/b&gt;&lt;br /&gt;
Use ‘CMD’&lt;br /&gt;
Go to the location:&lt;br /&gt;
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\bin&lt;br /&gt;
and run: &lt;span style="text-decoration: underline;"&gt;psconfig.exe -cmd Configdb create SkipRegisterAsDistributedCacheHost&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-5O_lxfhfUds/UMxnAop0IQI/AAAAAAAACYs/7yZaOqoD22o/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-5O_lxfhfUds/UMxnAop0IQI/AAAAAAAACYs/7yZaOqoD22o/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Re-run the configuration wizard
and you should get rid of above problem.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-large;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Problem #2&lt;/span&gt;&lt;/blockquote&gt;
&lt;b&gt;Configuration Failed&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Failed to create sample data&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;An exception of type System.ArgumentException was thrown. Additional exception information: The SDDL string contains an invalid sid or a sid that cannot be translated.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Parameter name: sddlForm&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-wNTFhpP2Rh4/UMxoSvwkEKI/AAAAAAAACY0/HLihs7Qs0V4/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="550" src="http://2.bp.blogspot.com/-wNTFhpP2Rh4/UMxoSvwkEKI/AAAAAAAACY0/HLihs7Qs0V4/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Resolution:&lt;/b&gt;&lt;br /&gt;
This sure looks like a rough patch work to do, but trust me it worked for many people and for me as well.&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Log in as the built-in Administrator account&lt;/li&gt;
&lt;li&gt;Create a new user account for the Search Service&lt;/li&gt;
&lt;li&gt;Add the new Search Service account to the local WSS_ADMIN_WPG group&lt;/li&gt;
&lt;li&gt;Open up SharePoint Management Shell and enter the following:&lt;/li&gt;
&lt;li&gt;$SearchService = Get-Credential&amp;nbsp;"MachineName\AccountName"&lt;/li&gt;
&lt;li&gt;Hit enter and then enter the account's password&lt;/li&gt;
&lt;li&gt;New-SPManagedAccount -Credential $SearchService&lt;/li&gt;
&lt;li&gt;Launch Central Administration (do this as the built-in Admin account because for some reason, other accounts in the local Administrators group are not showing up options in Central Administration, even if in the Farm Administrators group).&lt;/li&gt;
&lt;li&gt;Go to Security, Service Accounts, and change the Search Service to the new managed account&lt;/li&gt;
&lt;li&gt;Go to "C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server" and find the directory that starts with Analytics. It should be "Analytics_&amp;lt;GUID&amp;gt;".&lt;/li&gt;
&lt;li&gt;Right-click, Properties, Sharing, and click Advanced Sharing&lt;/li&gt;
&lt;li&gt;Check the "Share this folder' checkbox, leave the Share name alone and click on Permissions&lt;/li&gt;
&lt;li&gt;Leave Everyone having Read (for now), Add the Search Service account you created and select Full Control. Do the same and add WSS_ADMIN_WPG with Full Control. Click OK.&lt;/li&gt;
&lt;li&gt;Run the SharePoint Configuration Wizard again. It should move on to step 9, then 10 and finish.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
At last . . .&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-jKgnZ4aznvo/UMxo_NFD0RI/AAAAAAAACY8/dAXmVWY4ghc/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="550" src="http://1.bp.blogspot.com/-jKgnZ4aznvo/UMxo_NFD0RI/AAAAAAAACY8/dAXmVWY4ghc/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Configuration is successfully Completed. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-large;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Problem #3&lt;/span&gt;&lt;/blockquote&gt;
Now when you installed Visual Studio 2012 and All required Office tools using "Web Platform Installer", but some times when you create App for SharePoint , it may create empty project and say &lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;"An error occurred while trying to load some required components. Please ensure that the following prerequisite components are installed:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Microsoft Web Developer Tools &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Microsoft Exchange Web Services"&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
When you verify you have all these components installed, yet you will be getting this error.&lt;br /&gt;
&lt;b&gt;Resolution:&lt;/b&gt;&lt;br /&gt;
Unintall Web exchange service instances.&lt;br /&gt;
Unintall Microsoft Office Developer Tools.&lt;br /&gt;
&lt;br /&gt;
Now using "Webplatform Installer", install both and it will work this time.&lt;br /&gt;
Have fun :)&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-size: x-large;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Problem #&lt;span style="font-size: x-large;"&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
When you create the&amp;nbsp;SharePoint hosted&amp;nbsp;App and tried to deploy, the deployment may fail saying:&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;"Error&amp;nbsp;4&amp;nbsp;Error occurred in deployment step 'Install app for SharePoint': Failed to install app for SharePoint. Please see the output window for details.&lt;br /&gt;&amp;nbsp;&amp;nbsp;0&amp;nbsp;0&amp;nbsp;ClaimsApp"&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Resolution:&lt;/b&gt;&lt;br /&gt;
&lt;h3 class="procedureSubHeading"&gt;
Create an isolated app domain on your development computer&lt;/h3&gt;
&lt;div class="subSection"&gt;
&lt;ol&gt;
&lt;li&gt;Ensure that the spadmin and sptimer services are running by opening a command prompt and typing the following commands.&lt;br /&gt;
&lt;div class="codeSnippetContainer" id="code-snippet-2" xmlns=""&gt;
&lt;div class="codeSnippetContainerTabs"&gt;
&lt;div class="codeSnippetContainerTabSingle" dir="ltr"&gt;
&lt;a href="http://www.blogger.com/null"&gt;PowerShell&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCodeContainer"&gt;
&lt;div class="codeSnippetToolBar"&gt;
&lt;div class="codeSnippetToolBarText"&gt;
&lt;a href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_b3cf40b2-dba6-4ee2-8e4f-96f507858319');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard."&gt;Copy&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_b3cf40b2-dba6-4ee2-8e4f-96f507858319"&gt;
&lt;div style="color: black;"&gt;
&lt;pre&gt;net start spadminv4
net start sptimerv4
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Create your isolated app domain by running the SharePoint Management Shell as an administrator and typing the following command.&lt;br /&gt;
&lt;div class="codeSnippetContainer" id="code-snippet-3" xmlns=""&gt;
&lt;div class="codeSnippetContainerTabs"&gt;
&lt;div class="codeSnippetContainerTabSingle" dir="ltr"&gt;
&lt;a href="http://www.blogger.com/null"&gt;PowerShell&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCodeContainer"&gt;
&lt;div class="codeSnippetToolBar"&gt;
&lt;div class="codeSnippetToolBarText"&gt;
&lt;a href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_475465c6-8f14-4edd-899d-1f85851ddcfb');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard."&gt;Copy&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_475465c6-8f14-4edd-899d-1f85851ddcfb"&gt;
&lt;div style="color: black;"&gt;
&lt;pre&gt;Set&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPAppDomain &lt;span style="color: #a31515;"&gt;"your app domain"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Ensure that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running by typing the following command in the SharePoint Management Shell.&lt;br /&gt;
&lt;div class="codeSnippetContainer" id="code-snippet-4" xmlns=""&gt;
&lt;div class="codeSnippetContainerTabs"&gt;
&lt;div class="codeSnippetContainerTabSingle" dir="ltr"&gt;
&lt;a href="http://www.blogger.com/null"&gt;PowerShell&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCodeContainer"&gt;
&lt;div class="codeSnippetToolBar"&gt;
&lt;div class="codeSnippetToolBarText"&gt;
&lt;a href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_5f95c01a-a060-48fc-809b-0c85b043662d');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard."&gt;Copy&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_5f95c01a-a060-48fc-809b-0c85b043662d"&gt;
&lt;div style="color: black;"&gt;
&lt;pre&gt;Get&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPServiceInstance | where{&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;.GetType().Name &lt;span style="color: grey;"&gt;-eq&lt;/span&gt; &lt;span style="color: #a31515;"&gt;"AppManagementServiceInstance"&lt;/span&gt; &lt;span style="color: grey;"&gt;-or&lt;/span&gt; &lt;span style="color: orangered;"&gt;$_&lt;/span&gt;.GetType().Name &lt;span style="color: grey;"&gt;-eq&lt;/span&gt; &lt;span style="color: #a31515;"&gt;"SPSubscriptionSettingsServiceInstance"&lt;/span&gt;} | Start&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPServiceInstance
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Verify that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running by typing the following command in the SharePoint Management Shell. The output will indicate whether each service is online.&lt;br /&gt;
&lt;div class="codeSnippetContainer" id="code-snippet-5" xmlns=""&gt;
&lt;div class="codeSnippetContainerTabs"&gt;
&lt;div class="codeSnippetContainerTabSingle" dir="ltr"&gt;
&lt;a href="http://www.blogger.com/null"&gt;PowerShell&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCodeContainer"&gt;
&lt;div class="codeSnippetToolBar"&gt;
&lt;div class="codeSnippetToolBarText"&gt;
&lt;a href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_166773ba-a0c0-47cf-b90d-1c9e70a89056');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard."&gt;Copy&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_166773ba-a0c0-47cf-b90d-1c9e70a89056"&gt;
&lt;div style="color: black;"&gt;
&lt;pre&gt;Get&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPServiceInstance | where{&lt;span style="color: orangered;"&gt;$_&lt;/span&gt;.GetType().Name &lt;span style="color: grey;"&gt;-eq&lt;/span&gt; &lt;span style="color: #a31515;"&gt;"AppManagementServiceInstance"&lt;/span&gt; &lt;span style="color: grey;"&gt;-or&lt;/span&gt; &lt;span style="color: orangered;"&gt;$_&lt;/span&gt;.GetType().Name &lt;span style="color: grey;"&gt;-eq&lt;/span&gt; &lt;span style="color: #a31515;"&gt;"SPSubscriptionSettingsServiceInstance"&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;You must specify an account under which the SPSubscriptionService and AppManagementServiceInstance service instances will run. This account must be an SPManagedAccount. You can create an SPManagedAccount by typing the following command in the SharePoint Management Shell. (You’ll be prompted for the account domain\user and password.)&lt;br /&gt;
&lt;div class="codeSnippetContainer" id="code-snippet-6" xmlns=""&gt;
&lt;div class="codeSnippetContainerTabs"&gt;
&lt;div class="codeSnippetContainerTabSingle" dir="ltr"&gt;
&lt;a href="http://www.blogger.com/null"&gt;PowerShell&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCodeContainer"&gt;
&lt;div class="codeSnippetToolBar"&gt;
&lt;div class="codeSnippetToolBarText"&gt;
&lt;a href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_a07d0ea5-db59-4dd6-8d15-dbdc0e0a0059');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard."&gt;Copy&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_a07d0ea5-db59-4dd6-8d15-dbdc0e0a0059"&gt;
&lt;div style="color: black;"&gt;
&lt;pre&gt;&lt;span style="color: orangered;"&gt;$account&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; New&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPManagedAccount
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Specify an account, application pool, and database settings for the SPSubscriptionService and AppManagementServiceInstance services by typing the following code in the SharePoint Management Shell. If you created a SPManagedAccount in the preceding step, use that account name here.&lt;br /&gt;
&lt;div class="codeSnippetContainer" id="code-snippet-7" xmlns=""&gt;
&lt;div class="codeSnippetContainerTabs"&gt;
&lt;div class="codeSnippetContainerTabSingle" dir="ltr"&gt;
&lt;a href="http://www.blogger.com/null"&gt;PowerShell&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCodeContainer"&gt;
&lt;div class="codeSnippetToolBar"&gt;
&lt;div class="codeSnippetToolBarText"&gt;
&lt;a href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_eeac8951-8e1b-4809-a8c2-18d56f7592f3');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard."&gt;Copy&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_eeac8951-8e1b-4809-a8c2-18d56f7592f3"&gt;
&lt;div style="color: black;"&gt;
&lt;pre&gt;&lt;span style="color: orangered;"&gt;$account&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; Get&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPManagedAccount &lt;span style="color: #a31515;"&gt;"domain\user"&lt;/span&gt; 
&lt;span style="color: orangered;"&gt;$appPoolSubSvc&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; New&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPServiceApplicationPool &lt;span style="color: grey;"&gt;-&lt;/span&gt;Name SettingsServiceAppPool &lt;span style="color: grey;"&gt;-&lt;/span&gt;Account &lt;span style="color: orangered;"&gt;$account&lt;/span&gt;
&lt;span style="color: orangered;"&gt;$appPoolAppSvc&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; New&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPServiceApplicationPool &lt;span style="color: grey;"&gt;-&lt;/span&gt;Name AppServiceAppPool &lt;span style="color: grey;"&gt;-&lt;/span&gt;Account &lt;span style="color: orangered;"&gt;$account&lt;/span&gt;
&lt;span style="color: orangered;"&gt;$appSubSvc&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; New&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPSubscriptionSettingsServiceApplication –ApplicationPool &lt;span style="color: orangered;"&gt;$appPoolSubSvc&lt;/span&gt; –Name SettingsServiceApp –DatabaseName SettingsServiceDB 
&lt;span style="color: orangered;"&gt;$proxySubSvc&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; New&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication &lt;span style="color: orangered;"&gt;$appSubSvc&lt;/span&gt;
&lt;span style="color: orangered;"&gt;$appAppSvc&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; New&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPAppManagementServiceApplication &lt;span style="color: grey;"&gt;-&lt;/span&gt;ApplicationPool &lt;span style="color: orangered;"&gt;$appPoolAppSvc&lt;/span&gt; &lt;span style="color: grey;"&gt;-&lt;/span&gt;Name AppServiceApp &lt;span style="color: grey;"&gt;-&lt;/span&gt;DatabaseName AppServiceDB
&lt;span style="color: orangered;"&gt;$proxyAppSvc&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; New&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPAppManagementServiceApplicationProxy &lt;span style="color: grey;"&gt;-&lt;/span&gt;ServiceApplication &lt;span style="color: orangered;"&gt;$appAppSvc&lt;/span&gt;

&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Specify your tenant name by typing the following code in the SharePoint Management Shell.&lt;br /&gt;
&lt;div class="codeSnippetContainer" id="code-snippet-8" xmlns=""&gt;
&lt;div class="codeSnippetContainerTabs"&gt;
&lt;div class="codeSnippetContainerTabSingle" dir="ltr"&gt;
&lt;a href="http://www.blogger.com/null"&gt;PowerShell&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCodeContainer"&gt;
&lt;div class="codeSnippetToolBar"&gt;
&lt;div class="codeSnippetToolBarText"&gt;
&lt;a href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_baac564f-2928-4c60-a409-a31f9cd7ed90');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard."&gt;Copy&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_baac564f-2928-4c60-a409-a31f9cd7ed90"&gt;
&lt;div style="color: black;"&gt;
&lt;pre&gt;Set&lt;span style="color: grey;"&gt;-&lt;/span&gt;SPAppSiteSubscriptionName &lt;span style="color: grey;"&gt;-&lt;/span&gt;Name &lt;span style="color: #a31515;"&gt;"app"&lt;/span&gt; &lt;span style="color: grey;"&gt;-&lt;/span&gt;Confirm:&lt;span style="color: orangered;"&gt;$false&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
After you create your isolated app domain, perform the steps in the following procedure to add that domain to your bypass list in Internet Explorer. This ensures that you can navigate to this domain after you deploy a SharePoint-hosted app. You can skip this procedure if your environment does not use a proxy server.&lt;br /&gt;
&lt;br /&gt;
For more issues encountered while working with apps, please refer to my post&lt;br /&gt;
&lt;b&gt;"&lt;a href="http://pratapreddypilaka.blogspot.co.nz/2012/12/my-first-sharepoint-hosted-app-in-2013.html" style="color: #ff1900; font-family: Verdana, Geneva, sans-serif; text-align: -webkit-auto; text-decoration: none;"&gt;My First Sharepoint-Hosted App in 2013&lt;/a&gt;&lt;span style="background-color: #fff9ee; color: #222222; font-family: Verdana, Geneva, sans-serif; text-align: -webkit-auto;"&gt;"&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/mvucxK-e3Y8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/1784537697060208033/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/12/sharepoint-2013-standalone-installation.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/1784537697060208033?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/1784537697060208033?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/mvucxK-e3Y8/sharepoint-2013-standalone-installation.html" title="SharePoint 2013 Issues Encountered" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-oYH0DI3UbH0/UMxmwfGCN3I/AAAAAAAACYg/ELjVZmX05p8/s72-c/1.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/12/sharepoint-2013-standalone-installation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkADSXY6eyp7ImA9WhNXGEw.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-314414716792312764</id><published>2012-12-06T04:23:00.000-08:00</published><updated>2012-12-06T10:32:58.813-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-06T10:32:58.813-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Understanding Sharepoint Custom Claims Provider</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
Before going into any details, we should answer the obvious question.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Why Custom Claims Provider?&lt;/blockquote&gt;
Simple ! Claims auth based on Windows based, Forms based or SAML based authentication will generate Claims. But mostly they may not be compatible with the claim information what we / application require.&lt;br /&gt;
Below is a claim set generated by STS in case of Claims with Windows.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-s9POTaG3dtY/UMB5gAaSTxI/AAAAAAAACUo/q3QQ9z3Rs6k/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="358" src="http://2.bp.blogspot.com/-s9POTaG3dtY/UMB5gAaSTxI/AAAAAAAACUo/q3QQ9z3Rs6k/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, lets say Date of Birth is part of AD Group, and when user sign in to my site, i will get DOB as one of the claims. But task of my application is to categorize people into Kids (&amp;lt;18 Yrs), Youth (18 to 27), Middle Aged (27 to 40) and so on . . . which will be done by adding one more extra claim with respective values (kids, youth, middle aged . . . ), based on information provided by default claims(Age calculated from DOB). That task will be done by Custom Claim Provider.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;Now Custom Claim provider is the layer between Sharepoint STS and My Application, which will act like an adapter.&lt;br /&gt;
&lt;br /&gt;
There are many awesome resources like Articles, Posts and Videos on this specific task. Especially MSDN has a great repository of information. Below is the link.&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/hh394901%28v=office.14%29.aspx"&gt;MSDN Repository&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Again Obvious question, then what i will be writing in this post which is different from MSDN?&lt;br /&gt;
I have done a very simple example briefing the significance of every pieces of a Claims provider. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step1:&lt;/b&gt; Download the code from the &lt;a href="http://www.criticalpathtraining.com/_layouts/CriticalPath.Website/DownloadRedir.aspx?type=MemberDownload&amp;amp;id=62"&gt;link&lt;/a&gt;. It is the code written by Ted Pattison, a well renowned sharepoint security expert.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2:&lt;/b&gt; The custom provider class should be Implementing abstract class "&lt;b&gt;SPClaimProvider&lt;/b&gt;". &lt;br /&gt;
&amp;nbsp;Understand the declarations part where we declare name of claim provider, its type, Value and the name of the custom claim that we gona induce into claims repository provided by STS.&lt;br /&gt;
&lt;pre&gt;    internal const string ClaimProviderDisplayName = "Audience Claim Provider";
    internal const string ClaimProviderDescription = "SharePoint 2010 Demoware from Critical Path Training";
    protected const string AudienceClaimType = "http://www.wingtip.com/identity/claims/audience";
    protected const string StringTypeClaim = Microsoft.IdentityModel.Claims.ClaimValueTypes.String;

    public override string Name {
      get { return ClaimProviderDisplayName; }
    }

&lt;/pre&gt;
&lt;b&gt;Step 3: &lt;/b&gt;Now observe below 4 properties and 2 methods&lt;br /&gt;
&lt;pre&gt;   public override bool SupportsEntityInformation {
      get { return true; }
    }

    public override bool SupportsHierarchy {
      get { return true; }
    }

    public override bool SupportsResolve {
      get { return true; }
    }

    public override bool SupportsSearch {
      get { return true; }
    }
   protected override void FillClaimTypes(List&lt;string&gt; claimTypes) {
      if (claimTypes == null) throw new ArgumentException("claimTypes");

      claimTypes.Add(AudienceClaimType);
    }

    protected override void FillClaimValueTypes(List&lt;string&gt; claimValueTypes) {
      if (claimValueTypes == null) throw new ArgumentException("claimValueTypes");

      claimValueTypes.Add(StringTypeClaim);
    }
&lt;/string&gt;&lt;/string&gt;&lt;/pre&gt;
Though they look simple, these properties control the execution of the remaining code. For example, &lt;b&gt;SupportSearch&lt;/b&gt; property returns true. This means, when a search happens in my sitecollection, the code in my claim provider will be executed instead of default search code in sharepoint.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 4:&lt;/b&gt; We have 4 more abstract methods to override.&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;FillClaimsForEntity() - Method controls additional claims loaded/created for logged in user&lt;/li&gt;
&lt;li&gt;FillHierarchy() - Method controls the Claim provider hierarchy display in search window.&lt;/li&gt;
&lt;li&gt;FillSearch() - Method controls the search functionality in all people pickers in site collection.&lt;/li&gt;
&lt;li&gt;FillResolve() - Method controls functionality executed when you type in a name and click resolve button (one with green tick mark).&lt;/li&gt;
&lt;/ol&gt;
Here is where my code sample is simplified for better understanding. Instead of involving audience manager into scope, i simple created a array of strings representing users on my machine.&lt;br /&gt;
&lt;pre&gt;&lt;yellow&gt;internal string[] AvailableClaims = {"administrator","spuser","pratap" };&lt;/yellow&gt;
&lt;/pre&gt;
I will add extra claim with claim-type as "&lt;b&gt;http://www.wingtip.com/identity/claims/audience&lt;/b&gt;" and Claim-value as their name from this array.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 5:&lt;/b&gt; Look at the updated methods with simplest possible code.&lt;br /&gt;
&lt;pre&gt;    protected override void &lt;yellow&gt;FillClaimsForEntity&lt;/yellow&gt;(System.Uri context, SPClaim entity, List&lt;spclaim&gt; claims) {
      if (entity == null) throw new ArgumentException("entity");
      if (claims == null) throw new ArgumentException("claims");
          
          string userLogin = (entity.Value.Split('\\'))[1];
    
            foreach(string claim in AvailableClaims)
            {
                  if (userLogin.ToLower()==claim.ToLower()) {
                      claims.Add(CreateClaim(AudienceClaimType, claim, StringTypeClaim));
                  }
            }      
    }

    protected override void &lt;yellow&gt;FillHierarchy&lt;/yellow&gt;(System.Uri context, string[] entityTypes, string hierarchyNodeID, int numberOfLevels, SPProviderHierarchyTree hierarchy) {
      // No additional nodes need to be added to the People Picker
    }

    protected override void &lt;yellow&gt;FillSearch&lt;/yellow&gt;(System.Uri context, string[] entityTypes, string searchPattern, string hierarchyNodeID, int maxCount, SPProviderHierarchyTree searchTree) {
      if (EntityTypesContain(entityTypes, SPClaimEntityTypes.FormsRole)) {
        List&lt;string&gt; audiences = new List&lt;string&gt;();
     
          foreach (string claim in AvailableClaims) {
            if (claim.StartsWith(searchPattern, StringComparison.CurrentCultureIgnoreCase))
                     audiences.Add(claim);
          }
        
        foreach (string audienceName in audiences)
          searchTree.AddEntity(CreatePickerEntityForAudience(audienceName));
      }
    }

    protected override void &lt;yellow&gt;FillResolve&lt;/yellow&gt;(System.Uri context, string[] entityTypes, string resolveInput, List&lt;pickerentity&gt; resolved)
    {
        List&lt;string&gt; audiences = new List&lt;string&gt;();
        
        foreach (string claim in AvailableClaims)
        {
            if (claim.StartsWith(resolveInput, StringComparison.CurrentCultureIgnoreCase))
                audiences.Add(claim);
        }

        foreach (string audienceName in audiences)
        {
            resolved.Add(CreatePickerEntityForAudience(audienceName));
        }
    }
&lt;/string&gt;&lt;/string&gt;&lt;/pickerentity&gt;&lt;/string&gt;&lt;/string&gt;&lt;/spclaim&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Output:&lt;/span&gt; &lt;br /&gt;
&lt;i&gt;Now when i log into application, below are the claims created because of my code.&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-idNccBGPyKM/UMCEznR_-fI/AAAAAAAACWE/CSwthcYlrFw/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="378" src="http://1.bp.blogspot.com/-idNccBGPyKM/UMCEznR_-fI/AAAAAAAACWE/CSwthcYlrFw/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;i&gt;Look at the people picker search window changed from what to what.&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-nwNiPSkPR7Q/UMCGEq3mXoI/AAAAAAAACWM/dGBW7jyJUH0/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="131" src="http://1.bp.blogspot.com/-nwNiPSkPR7Q/UMCGEq3mXoI/AAAAAAAACWM/dGBW7jyJUH0/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;If you observe we haven't implemented any thing in FillHierarchy() Method as we didn't have any child nodes to display in our claim provider. But you can implement this method if you want to display some thing like below.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-iBnTg5oanLc/UMCH4ckuU-I/AAAAAAAACWc/cQIm81x9nrs/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-iBnTg5oanLc/UMCH4ckuU-I/AAAAAAAACWc/cQIm81x9nrs/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Look how the resolving of names got changed.&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-RVvryIq5wSY/UMCG3F3YHDI/AAAAAAAACWU/kaQX5wkSmoc/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="450" src="http://4.bp.blogspot.com/-RVvryIq5wSY/UMCG3F3YHDI/AAAAAAAACWU/kaQX5wkSmoc/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
If you observe the first one is resolved based on my windows credentials. But the second one is resolved based on my claim value.&lt;br /&gt;
&lt;br /&gt;
Last obvious question, &lt;b&gt;what we achieved from this?&lt;/b&gt;&lt;br /&gt;
Well let me show you. i have a document which has to be displayed for people whose age&amp;gt;18.&lt;br /&gt;
we need to do 2 simple things.&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;Break default inheritance of permissions on that document.&lt;/li&gt;
&lt;li&gt;Assign the permissions to "Youth" and "MiddleAge" claims.&lt;/li&gt;
&lt;/ol&gt;
Now anyone who login with age less than 18 will not be able to see it. Now you don't need to bother about no of people and their ids or their AD Associations. Just follow our custom claim value.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Demo: &lt;/b&gt;I have a document library with 3 documents. I want to show only 2 documents to user Pratap.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-cuR3yFNRgTc/UMCKUteHO_I/AAAAAAAACXQ/hBfjXaHt9y8/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="186" src="http://3.bp.blogspot.com/-cuR3yFNRgTc/UMCKUteHO_I/AAAAAAAACXQ/hBfjXaHt9y8/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Go to those two documents and manage their permissions.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-z4iftseBEOM/UMCLeAWhhGI/AAAAAAAACXY/sgehGZQ62Ic/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="192" src="http://3.bp.blogspot.com/-z4iftseBEOM/UMCLeAWhhGI/AAAAAAAACXY/sgehGZQ62Ic/s400/8.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
Remove all users from access list and remove permission inheritance.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-yEm0ZmoxclE/UMCMfHszoAI/AAAAAAAACXg/KjFTj_zog8c/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="274" src="http://3.bp.blogspot.com/-yEm0ZmoxclE/UMCMfHszoAI/AAAAAAAACXg/KjFTj_zog8c/s640/9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Add access to specific claim type, in this case to "pratap".&lt;br /&gt;
Now, when pratap login, this is how the document library will be displayed.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-e4u05wE7dQY/UMCNJyvyQdI/AAAAAAAACXo/HqkMDX_ZFrI/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="190" src="http://1.bp.blogspot.com/-e4u05wE7dQY/UMCNJyvyQdI/AAAAAAAACXo/HqkMDX_ZFrI/s640/10.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Task accomplished. We have learned about Custom Claims Provider, significance of each method in it and Importantly how granular level security can be implemented using custom claims.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://skydrive.live.com/redir?resid=56F6D80369352266!103"&gt;Download My Sample Code&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Is it helpful for you? Kindly let me know your comments / Questions.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/uTkGu4g8uPQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/314414716792312764/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/12/understanding-sharepoint-custom-claims.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/314414716792312764?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/314414716792312764?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/uTkGu4g8uPQ/understanding-sharepoint-custom-claims.html" title="Understanding Sharepoint Custom Claims Provider" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-s9POTaG3dtY/UMB5gAaSTxI/AAAAAAAACUo/q3QQ9z3Rs6k/s72-c/1.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/12/understanding-sharepoint-custom-claims.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QARn09cCp7ImA9WhBWFEs.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-279035999273042875</id><published>2012-12-06T02:11:00.000-08:00</published><updated>2013-04-08T15:49:07.368-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-08T15:49:07.368-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Claims Based Authentication in Sharepoint</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
In this post we will try to understand the basics of&lt;b&gt; &lt;/b&gt;Claims Based Authentication in SharePoint.&lt;br /&gt;
Lets start this with Claims.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
Claim is a piece of information which will authenticate you with in a set of agreed parties.&lt;/blockquote&gt;
&lt;br /&gt;
Let me put it in a simple way for better understanding. If there is a carnival with entrance fee of 100 bucks and all the rides inside are free. When you enter carnival, you pay once and have the ticket with you. Now every time you get on a ride, you just need to show that entrance ticket. The person operating rides will trust the ticket granted by person near entrance.&lt;br /&gt;
So, Entrance ticket is the claim you carry.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;Claims based authentication is a new feature introduced by SP2010. We already have classic authentication, so why claims?&lt;br /&gt;
Classic authentication works on AD groups. Just imagine for a public facing site, how many AD Group additions need to be done up on user requests.&lt;br /&gt;
Secondly, it is for a point to point communication. The security cannot span beyond one application pool.&lt;br /&gt;
&lt;br /&gt;
But in case of claims, it has ability to grant a security token which can authenticate user for all the application which mutually agrees with a System granting security tokens for authenticated users. This granting system generally refers as STS (Security Token System).&lt;br /&gt;
&lt;br /&gt;
Most people jump to decision of using ADFS or some other STS with claims based authentication in SharePoint. Well the user have option to have flexibility of claims even on Windows or Forms based Authentications. You can see all these options while creating a SharePoint Web application.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-eCqhL_OI4Vk/UMBpcZBzn8I/AAAAAAAACSw/Z8fzjwoRkvQ/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="442" src="http://4.bp.blogspot.com/-eCqhL_OI4Vk/UMBpcZBzn8I/AAAAAAAACSw/Z8fzjwoRkvQ/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Understanding the Windows Authentication Process&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-BTzQRkMCNU0/UMBrclXcn1I/AAAAAAAACS4/o9kpVs-_yK8/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="502" src="http://2.bp.blogspot.com/-BTzQRkMCNU0/UMBrclXcn1I/AAAAAAAACS4/o9kpVs-_yK8/s640/2.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;The user requests a SharePoint 2010 resource.&lt;/li&gt;
&lt;li&gt;User authentication (NTLM challenge/Kerberos negotiation) occurs.&lt;/li&gt;
&lt;li&gt;The claims-based token request is sent to the SharePoint 2010 STS.&lt;/li&gt;
&lt;li&gt;SharePoint STS gets the user's security groups from the Windows token and adds them as user claims in the token.&lt;/li&gt;
&lt;li&gt;The SharePoint STS gets additional claims for the user (if an additional claims provider is registered for that web application/zone).&lt;/li&gt;
&lt;li&gt;The claims-based token is issued.&lt;/li&gt;
&lt;li&gt;The request is processed by the rest of the components in the pipeline.&lt;/li&gt;
&lt;li&gt;The response is sent back to the user.&lt;/li&gt;
&lt;/ol&gt;
&lt;span style="font-size: large;"&gt;Understanding the Forms-Based Authentication Process&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-BzV-yML35zI/UMBuDlhkxsI/AAAAAAAACTs/nVHgLcvmX0Q/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="502" src="http://4.bp.blogspot.com/-BzV-yML35zI/UMBuDlhkxsI/AAAAAAAACTs/nVHgLcvmX0Q/s640/3.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;The user requests a SharePoint 2010 resource.&lt;/li&gt;
&lt;li&gt;SharePoint redirects the user to the forms-based authentication login page.&lt;/li&gt;
&lt;li&gt;The username and password are collected from the user and sent to the SharePoint 2010 STS.&lt;/li&gt;
&lt;li&gt;STS validates the user's credentials with the membership provider and, if validation succeeds, STS requests all the roles that the user belongs to and adds those claims to the user's token.&lt;/li&gt;
&lt;li&gt;The SharePoint STS gets additional claims for the user (if an additional claims provider is registered for that web application/zone).&lt;/li&gt;
&lt;li&gt;The claims-based token is issued to the user.&lt;/li&gt;
&lt;li&gt;The request is processed by the rest of the components in the pipeline.&lt;/li&gt;
&lt;li&gt;The response is sent back to the user.&lt;/li&gt;
&lt;/ol&gt;
&lt;span style="font-size: large;"&gt;Understanding the SAML Claims-Based Authentication Process&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-mlX0fVPAOag/UMBuuAHHVBI/AAAAAAAACT0/HJBd-RUyPbM/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="496" src="http://4.bp.blogspot.com/-mlX0fVPAOag/UMBuuAHHVBI/AAAAAAAACT0/HJBd-RUyPbM/s640/4.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="subSection"&gt;
&lt;ol class="ordered"&gt;
&lt;li&gt; The user requests a SharePoint 2010 resource.&lt;br /&gt;
 &lt;/li&gt;
&lt;li&gt; SharePoint redirects the user to the SAML authentication page.&lt;br /&gt;
 &lt;/li&gt;
&lt;li&gt; Based
 on the configuration of the trusted login provider, the request is 
redirected to the enterprise STS login page or to the federated STS 
login page.&lt;br /&gt;
 &lt;/li&gt;
&lt;li&gt; The user provides credentials and STS issues a SAML claims-based token.&lt;br /&gt;
 &lt;/li&gt;
&lt;li&gt; The external STS issues the user claims-based token.&lt;br /&gt;
 &lt;/li&gt;
&lt;li&gt; A
 claims-based token for the user is requested from the SharePoint STS, 
and the token from the external STS is used as the authentication proof.&lt;br /&gt;
 &lt;/li&gt;
&lt;li&gt; SharePoint
 STS gets additional claims for the user (if an additional claims 
provider is registered for that web application or zone).&lt;br /&gt;
 &lt;/li&gt;
&lt;li&gt; SharePoint STS issues the claims-based token.&lt;br /&gt;
 &lt;/li&gt;
&lt;li&gt; The request is processed by the rest of the components in the pipeline.&lt;br /&gt;
 &lt;/li&gt;
&lt;li&gt; The response is sent back to the user.&lt;br /&gt;
 &lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;b&gt;Source : MSDN&lt;/b&gt;&lt;br /&gt;
Find the DEMO in my next post.&amp;nbsp;&lt;a href="http://pratapreddypilaka.blogspot.co.nz/2012/12/understanding-sharepoint-custom-claims.html"&gt;Demo - Claims Based Authentication&lt;/a&gt;.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/2qTEPhvgoNI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/279035999273042875/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/12/claims-based-authentication-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/279035999273042875?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/279035999273042875?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/2qTEPhvgoNI/claims-based-authentication-in.html" title="Claims Based Authentication in Sharepoint" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-eCqhL_OI4Vk/UMBpcZBzn8I/AAAAAAAACSw/Z8fzjwoRkvQ/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/12/claims-based-authentication-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMAQnk-fCp7ImA9WhNQGUU.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-3640501984205382412</id><published>2012-11-26T15:07:00.000-08:00</published><updated>2012-11-26T17:40:43.754-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-26T17:40:43.754-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net" /><category scheme="http://www.blogger.com/atom/ns#" term="WCF" /><title>Access WCF Service Without Service Reference</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Change is Inevitable&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-rvlkprI9BD0/ULPm1IjIHBI/AAAAAAAACR8/wFrGE1oIOhI/s1600/funny-science-news-experiments-memes-change-is-inevitable.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="256" src="http://4.bp.blogspot.com/-rvlkprI9BD0/ULPm1IjIHBI/AAAAAAAACR8/wFrGE1oIOhI/s400/funny-science-news-experiments-memes-change-is-inevitable.jpg" tea="true" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
This absolutely applies to Client Requirements, but not to&amp;nbsp;our code . In other words, the above statement is one of the 3 design principles of Software architecture. &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;div style="text-align: left;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System should be Fault Tolerant.&lt;/div&gt;
&lt;/blockquote&gt;
This means, our system should be adoptable for changes and shouldn't break for every reasonable change.&lt;br /&gt;
Reason for bringing up this point is a recent situation i undergo.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;Situation: &lt;/strong&gt;&lt;br /&gt;
I have my application consuming 4 WFC Services. And i need all 4 of them "Up and Running" all the time. In case of any failure i need to to intimated immediately. In simple words, i need a health monitoring system for all these services. Usually, i will create a system, which will consume these services via Service reference, and will invoke a method from each service and see if its responding or not.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Challenge: Service Reference&lt;/strong&gt;&lt;br /&gt;
Yes, Service reference is the current challenge before us. Today, i have a set of services. May be tomorrow, all these services may be replaced by different services. Else couple of more services may got added. In both of the scenarios, i have to open my Heal monitoring system, and create service reference of new services.&lt;br /&gt;
This is a code change and it requires awful amount of time for testing the system.&lt;br /&gt;
You may think of generating a class file from wsdl using SVCUtil.exe, and then adding that class file in code. But it also required the code modification. Right?&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Resolution: &lt;/strong&gt;Access the WCF Service without service reference.&amp;nbsp; &lt;br /&gt;
This process is also called as "&lt;strong&gt;Dynamic Proxy Generation&lt;/strong&gt;". &lt;br /&gt;
While browsing for solution for my problem, i found a library written by a MSFT employee, which will take care of this. I would like to bring the same to your notice in this post.&lt;br /&gt;
&lt;br /&gt;
1. Download the Project code attached in source.&lt;br /&gt;
2. Follow the steps mentioned below &lt;br /&gt;
3. Configure the services in config file and use the code snippet embedded below.&lt;br /&gt;
4. Have fun.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Source Code: &lt;a href="https://skydrive.live.com/#cid=56F6D80369352266&amp;amp;id=56F6D80369352266%21103"&gt;Dynamic Proxy Library&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
1. Download code from above link. Look for "DynamicProxyLibrary" &lt;br /&gt;
2. Add the class library to your project. Change the Framework Version of the class library project to suite your actual project version. Else it will not allow you to refer the Project output.&lt;br /&gt;
3. Currently it is in 4.0 version. When you change the version, there are 2 dlls, which will go obsolete. &lt;br /&gt;
&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.ServiceModel.dll&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Syetm.Runtime.Serialization.dll&lt;/em&gt;&lt;br /&gt;
4. Remove the obsolete &lt;span style="font-family: 'Times New Roman','serif'; font-size: 12pt; line-height: 115%; mso-ansi-language: EN-NZ; mso-bidi-language: AR-SA; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-NZ;"&gt;references &lt;/span&gt;and try adding those &lt;span style="font-family: 'Times New Roman','serif'; font-size: 12pt; line-height: 115%; mso-ansi-language: EN-NZ; mso-bidi-language: AR-SA; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-NZ;"&gt;references &lt;/span&gt;from&amp;nbsp;either&amp;nbsp;GAC or&amp;nbsp;from below path.&lt;br /&gt;
&lt;strong&gt;"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\(version)"&lt;/strong&gt;&lt;br /&gt;
5. Once you are done with refreing above class library, use the below piece of code to create a Dyanmic proxy for the WCF Service.&lt;br /&gt;
&lt;pre&gt;DynamicProxyFactory factory = 
new DynamicProxyFactory("http://localhost/Dependency1WCFSvc/DateService.svc?wsdl");
DynamicProxy proxy = factory.CreateProxy("IDateService");
var result = proxy.CallMethod("GetDate", null);
&lt;/pre&gt;
In order to generate a Dynamic proxy, you need to have the url, name of the Contract. For ease of implementation, i haven't dealt with security stuff right now. We will see it in upcoming posts.&lt;br /&gt;
&lt;br /&gt;
Task accomplished. We are able to access a WCF Service without service reference.&lt;br /&gt;
&lt;br /&gt;
Is it helpful for you? Kindly let me know your comments / Questions. &lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/a7fCgwF74LE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/3640501984205382412/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/11/access-wcf-service-without-service.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/3640501984205382412?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/3640501984205382412?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/a7fCgwF74LE/access-wcf-service-without-service.html" title="Access WCF Service Without Service Reference" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-rvlkprI9BD0/ULPm1IjIHBI/AAAAAAAACR8/wFrGE1oIOhI/s72-c/funny-science-news-experiments-memes-change-is-inevitable.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/11/access-wcf-service-without-service.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQCRXszeSp7ImA9WhNQFk0.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-2884006847677108192</id><published>2012-11-21T19:55:00.002-08:00</published><updated>2012-11-22T10:02:44.581-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-22T10:02:44.581-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Uploading Documents Programatically to a Content Organizer Enabled Site</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt; We have covered &lt;a href="http://pratapreddypilaka.blogspot.co.nz/2012/11/content-organizer-metadata-routing-in.html"&gt;&lt;strong&gt;Content Organizer / Metadata Routing in SP2010&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;in earlier post.&lt;br /&gt;
We have created all the required infrastructure for meta data routing or Content organizing. So only task remining is uploading the documents.&lt;br /&gt;
Well ! we cannot ask the users to navigate to Drop Off library and upload their documents. Right?&lt;br /&gt;
So i have created a simple&amp;nbsp;Webpart for uploading the documents for the specific content type.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-HD03aria9Io/UK2Wa7DcRqI/AAAAAAAACNA/BoNcW5L40-E/s1600/FileUploadPOC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="204" rea="true" src="http://1.bp.blogspot.com/-HD03aria9Io/UK2Wa7DcRqI/AAAAAAAACNA/BoNcW5L40-E/s640/FileUploadPOC.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;Now we need to upload the selected files programatically to Drop Off Library.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;Below is the code written by me for uplaoding the file to DropOff Library of the respective site.&lt;br /&gt;
&lt;pre&gt; 
private void &lt;yellow&gt;UploadFromFileControl&lt;/yellow&gt;(FileUpload fuFile,string description)
        {
            using (SPWeb objWeb = SPContext.Current.Site.OpenWeb())
            {
                objWeb.AllowUnsafeUpdates = true;
                
                SPFolder myLibrary = objWeb.Folders[&lt;yellow&gt;"DropOffLibrary"&lt;/yellow&gt;];
                Boolean replaceExistingFiles = true;
                String fileName = System.IO.Path.GetFileName(fuFile.PostedFile.FileName);
                Int32 fileLen = fuFile.PostedFile.ContentLength;
                Byte[] Input = new Byte[fileLen];
                Stream fileStream = fuFile.FileContent;
                fileStream.Read(Input, 0, fileLen);
                SPFile spFile = myLibrary.Files.Add(Path.GetFileName(fuFile.PostedFile.FileName), fileStream, replaceExistingFiles);

                SPListItem spListItem = spFile.ListItemAllFields;
                spListItem["ContentType"] = objWeb.ContentTypes["CntUploadedDocs"];
                spListItem["CandidateId"] = CandidateId;
                spListItem["Relationship"] = ddlRelation.Items[ddlRelation.SelectedIndex].Value.ToString();
                spListItem["DocumentType"] = ddlDocumentType.Items[ddlDocumentType.SelectedIndex].Value.ToString();
                spListItem["Description"] = description;
                spListItem.Update();
                spFile.Update();
            }
        }
&lt;/pre&gt;
&lt;strong&gt;Result: &lt;/strong&gt;Code executed perfectly, and the Document is uploaded to DropOff Library. I opened the DropOff&amp;nbsp; library and the record is successfully added. Task Acomplished? &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-1UoBPbV7BL4/UK2Z7X7jrBI/AAAAAAAACNw/9D_beUntjJI/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="104" rea="true" src="http://4.bp.blogspot.com/-1UoBPbV7BL4/UK2Z7X7jrBI/AAAAAAAACNw/9D_beUntjJI/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
No! Our task is not to add the document to DropOff library. Automatically it has to be moved from DropOff library to destination Library by Content organizer. But why it is still waiting there. Then i came across a&amp;nbsp;stunning fact that . . .&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;strong&gt;&lt;span style="color: red;"&gt;Content Organizer Rules will not be triggered for Documents added to DropOff Library Programatically&lt;/span&gt;&lt;/strong&gt;&lt;/blockquote&gt;
Now i went to Content Organizer settings and copied the webservice Url at the bottom.&lt;br /&gt;
Usually it ends with "&lt;strong&gt;/vti_bin/OfficialFile.asmx&lt;/strong&gt;".&lt;br /&gt;
Reffered the web service in&amp;nbsp;my&amp;nbsp;visual studio solution with name "FileUploadSvc".&lt;br /&gt;
Obviously you will end up writing code using "SPFile", "SPListItem" and&amp;nbsp;"FileUploadSvcSoapClient".&lt;br /&gt;
It is a tedious process of doing so, but later i realized that reffering &lt;strong&gt;OfficialFile.asmx&lt;/strong&gt;&amp;nbsp;will&amp;nbsp;create a Circualr refrence issue.&lt;br /&gt;
Reason being, the web service url has to be used for configuring &amp;nbsp;"&lt;strong&gt;SendTo&lt;/strong&gt;" connections in Central Admin for access from other sites.&amp;nbsp;Not for refering in your own website.&lt;br /&gt;
&lt;br /&gt;
Now, i end up with a big question . .&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: red;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;strong&gt;&lt;span style="color: red;"&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;How to Upload Documents to Content Organizer Enabled Site Programtically&amp;nbsp;and make the Content Oragnizer rule trigger automatically?&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/blockquote&gt;
&lt;strong&gt;&lt;span style="color: red;"&gt;
&lt;/span&gt;&lt;/strong&gt;Here is the answer . . . &lt;strong&gt;Microsoft.Office.Policy.dll&amp;nbsp;&lt;/strong&gt; 
&lt;br /&gt;
Add this dll to your solution, and&amp;nbsp;use "&lt;strong&gt;Microsoft.Office.RecordsManagement.RecordsRepository.dll&lt;/strong&gt;" in your class file.&lt;br /&gt;
&lt;br /&gt;
Doing so, you can access a class called "&lt;strong&gt;OfficialFileCore&lt;/strong&gt;"&amp;nbsp; which will reffer the OfficialFile.asmx webservice by default. Try browsing the webservice and see what are the methods available.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-T4N4D14D3tc/UK2deShKhfI/AAAAAAAACOg/2YBzepifn3k/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" rea="true" src="http://1.bp.blogspot.com/-T4N4D14D3tc/UK2deShKhfI/AAAAAAAACOg/2YBzepifn3k/s1600/3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
Look at th last method, "SubmitFile". That is the method we need to use and MSDN has lot of information to offer about syntax and other stuff.&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/ee584221.aspx"&gt;Microsoft link talking about Syntax.&lt;/a&gt;&lt;br /&gt;
Now i changed the code of my usercontrol to :&lt;br /&gt;
&lt;pre&gt;        
private void &lt;yellow&gt;UploadFromFileControl&lt;/yellow&gt;(FileUpload fuFile,string description)
        {
            using (SPWeb objWeb = SPContext.Current.Site.OpenWeb())
            {               
                try
                {
                    string destination = null;
                    String fileName = System.IO.Path.GetFileName(fuFile.PostedFile.FileName);
                    Int32 fileLen = fuFile.PostedFile.ContentLength;
                    Byte[] Input = new Byte[fileLen];
                    Stream fileStream = fuFile.FileContent;
                    fileStream.Read(Input, 0, fileLen);

                    List&lt;microsoft .sharepoint.recordsrepositoryproperty=".sharepoint.recordsrepositoryproperty"&gt; properties = new List&lt;microsoft .sharepoint.recordsrepositoryproperty=".sharepoint.recordsrepositoryproperty"&gt;();
    properties.Add(new Microsoft.SharePoint.RecordsRepositoryProperty() 
              { Name = "Name", Type = "Text", Value = fileName });
    properties.Add(new Microsoft.SharePoint.RecordsRepositoryProperty() 
              { Name = "CandidateId", Type = "Text", Value = CandidateId });
    properties.Add(new Microsoft.SharePoint.RecordsRepositoryProperty() 
              { Name = "Relationship", Type = "Text", Value = ddlRelation.Items[ddlRelation.SelectedIndex].Value.ToString() });
    properties.Add(new Microsoft.SharePoint.RecordsRepositoryProperty() 
              { Name = "DocumentType", Type = "Text", Value = ddlDocumentType.Items[ddlDocumentType.SelectedIndex].Value.ToString() });
   properties.Add(new Microsoft.SharePoint.RecordsRepositoryProperty() 
              { Name = "Description", Type = "Text", Value = description });
   properties.Add(new Microsoft.SharePoint.RecordsRepositoryProperty() 
              { Name = "ContentType", Type = "Text", Value = "CntUploadedDocs" });
   var result = &lt;yellow&gt;OfficialFileCore.SubmitFile(objWeb, Input, properties.ToArray(), "CntUploadedDocs", fuFile.PostedFile.FileName, @"domain\pratap", false, out destination);&lt;/yellow&gt;

                }
                catch (Exception ex)
                {
                }
                
            }
        }
&lt;/microsoft&gt;&lt;/microsoft&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Before deploying the code, there is another step to perform to have a smooth execution.&lt;br /&gt;
Go to Site Actions &amp;gt; Site Permissions &amp;gt; Add the Current or Configured user&amp;nbsp; to this group.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-qsL7rzAznz0/UK5oqaZsxDI/AAAAAAAACRI/7WRJ2zCPNUA/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="286" src="http://4.bp.blogspot.com/-qsL7rzAznz0/UK5oqaZsxDI/AAAAAAAACRI/7WRJ2zCPNUA/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
If you havent done above action, you will not be able to add the records to any library and the SubmitFile method will return "NotFound" response back as a result of execution.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;Deployed the solution and added the record again.&lt;/em&gt; &lt;/strong&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-n2VRd1m_4MA/UK2gY_Wl45I/AAAAAAAACPQ/wqTpsumCp0s/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" rea="true" src="http://2.bp.blogspot.com/-n2VRd1m_4MA/UK2gY_Wl45I/AAAAAAAACPQ/wqTpsumCp0s/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;em&gt;&lt;strong&gt;DropOff Library:&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-5TCul5GlOpc/UK2hN-3fMfI/AAAAAAAACPY/jDVgZsjL9Yc/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="114" rea="true" src="http://3.bp.blogspot.com/-5TCul5GlOpc/UK2hN-3fMfI/AAAAAAAACPY/jDVgZsjL9Yc/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;em&gt;&lt;strong&gt;Destination Document&amp;nbsp;Library:&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-4CYgl5aNDK4/UK2hXNGe4WI/AAAAAAAACPg/LsoOeLv5UQs/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="98" rea="true" src="http://1.bp.blogspot.com/-4CYgl5aNDK4/UK2hXNGe4WI/AAAAAAAACPg/LsoOeLv5UQs/s640/Untitled.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Task Acomplished. We are able to Add / Upload document programatically to a Content Organizer enabled site. &lt;br /&gt;
Is it helpful for you? Kindly let me know your comments / Questions. &lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/r23Yy2ryJQY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/2884006847677108192/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/11/uploading-documents-programtically-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/2884006847677108192?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/2884006847677108192?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/r23Yy2ryJQY/uploading-documents-programtically-to.html" title="Uploading Documents Programatically to a Content Organizer Enabled Site" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-HD03aria9Io/UK2Wa7DcRqI/AAAAAAAACNA/BoNcW5L40-E/s72-c/FileUploadPOC.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/11/uploading-documents-programtically-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYDSH49eCp7ImA9WhNSGUs.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-2087551741653545081</id><published>2012-11-02T19:15:00.001-07:00</published><updated>2012-11-03T11:09:39.060-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-03T11:09:39.060-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Content Organizer / Metadata Routing in SP2010</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
Clients doesn't bother about content types and sub-sites. All they want is a User-Interface, where they simple upload / download their documents, do some simple tasks.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-w9mzLzL0LPM/UJRWbvtNCZI/AAAAAAAACG4/RD7WJgWao_M/s1600/doc_mgmt.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="307" src="http://2.bp.blogspot.com/-w9mzLzL0LPM/UJRWbvtNCZI/AAAAAAAACG4/RD7WJgWao_M/s320/doc_mgmt.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
As a part of Sharepoint application setup or usage, end users will be 
uploading loads of documents on to the site. So, its our job to make them
 organized and and easily fectchable.&lt;br /&gt;
&lt;br /&gt;
Content Organizing / Metadata Routing is one of the key Features of 
Sharepoint 2010, which made developer's and contributer's life easy in this Aspect.&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Let me demonstrate the how to configure the Content Organizer for your ease of document management.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
I have a SharePoint application "&lt;b&gt;PROFILER&lt;/b&gt;" for the new Joiners of a company.&lt;br /&gt;
I have 3 separate sub-sites one for each department, said "&lt;b&gt;Human Resources&lt;/b&gt;","&lt;b&gt;Corporate Responsibility&lt;/b&gt;" and "&lt;b&gt;Tax&lt;/b&gt;". Each site has a picture library with name "Profiles".&lt;br /&gt;
&lt;br /&gt;
PROFILER (&lt;b&gt;Main Site Collection&lt;/b&gt;) will collect all the profile details like, Employee name, Employee id, Employee Department and Employee picture.&amp;nbsp; So, when a new Joiner creates his profile, all the details will be saved to "Profiles" libraries in respective sites based on their department. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1:&lt;/b&gt;&lt;br /&gt;
First, enable the content Organizer Feature on all 4 sites (1 Main site, and 3 Subsites).&lt;br /&gt;
Sit Seetings =&amp;gt; Manage Site Features =&amp;gt; Activate "Content Organizer" feature.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-IkvREBI-nyE/UJRd7zfYWSI/AAAAAAAACHo/XRA2gyeZXOE/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="134" src="http://2.bp.blogspot.com/-IkvREBI-nyE/UJRd7zfYWSI/AAAAAAAACHo/XRA2gyeZXOE/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
once you enable this features, you will see a couple of new things in your site.&lt;br /&gt;
New options will be displayed under Site Administration, for content organizing.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-EIPFkKthXyo/UJRfcOeD-TI/AAAAAAAACIA/ejE9ghp9x-0/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-EIPFkKthXyo/UJRfcOeD-TI/AAAAAAAACIA/ejE9ghp9x-0/s1600/2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
New Library will be created with name Drop Off Library. &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-4_ACAhIspao/UJRfLmFD2QI/AAAAAAAACH0/0kxdclJbfiM/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-4_ACAhIspao/UJRfLmFD2QI/AAAAAAAACH0/0kxdclJbfiM/s1600/3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;We will see about "Drop Off Library" after looking at content organizer Settings and Rules.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2:&lt;/b&gt;&lt;br /&gt;
Go to Main Site collection to which Users will be uploading their profiles Via a Custom web part or may be direct upload or by some other means.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
Open Content Organizer Settings. (Main site Collection's)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The below attribute has to be checked based on whethers users upload directly to different libraries, or the profiles will be uploaded programatically to one library.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-9dTIXfbbqT4/UJRitFuyfvI/AAAAAAAACIQ/YiAbeY3_SfU/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://1.bp.blogspot.com/-9dTIXfbbqT4/UJRitFuyfvI/AAAAAAAACIQ/YiAbeY3_SfU/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
As we are trying to move the profiles from this site to subsites, check the below attribute.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-_IgLRtjW8Oc/UJRhizQGJbI/AAAAAAAACII/oQH0k2qwK7s/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="97" src="http://2.bp.blogspot.com/-_IgLRtjW8Oc/UJRhizQGJbI/AAAAAAAACII/oQH0k2qwK7s/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Verify who got assigned as a Rule manager, the one who can create or drop Content Ogranizer Rules.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-4-Ph7vFfbFE/UJRi8W0AmQI/AAAAAAAACIY/ZAJ1L7XTrsE/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="176" src="http://3.bp.blogspot.com/-4-Ph7vFfbFE/UJRi8W0AmQI/AAAAAAAACIY/ZAJ1L7XTrsE/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Save and go back to site settings.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 3:&lt;/b&gt;&lt;br /&gt;
Go to Receiver site, i.e., Tax site's Content Organizer settings screen, there will be a "web service URL"at bottom. Copy it.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-5-bKldybQzs/UJRw6cCKrRI/AAAAAAAACK4/XxBBeOQwhmk/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="116" src="http://4.bp.blogspot.com/-5-bKldybQzs/UJRw6cCKrRI/AAAAAAAACK4/XxBBeOQwhmk/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;Open Central Admin =&amp;gt; General Application Settings =&amp;gt; External Service Connection =&amp;gt; Click on "Configure Send To Connections"&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-UBDqTY4gfds/UJRroDtK4uI/AAAAAAAACJ4/scbdi_Ph-d8/s1600/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://4.bp.blogspot.com/-UBDqTY4gfds/UJRroDtK4uI/AAAAAAAACJ4/scbdi_Ph-d8/s640/12.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Send Connection configuration screen will be opened now. Select the source site which want to send the content across.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-BZMzmHheC6Q/UJRs2UmHhQI/AAAAAAAACKA/3EkIo_SYatI/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="188" src="http://2.bp.blogspot.com/-BZMzmHheC6Q/UJRs2UmHhQI/AAAAAAAACKA/3EkIo_SYatI/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;Name the Send-To connection. I named it as "Profile Content Source". Paste the web service url you copied earlier. Select what kind of action you want. Move/ Copy / Move leaving Link to New Location.&lt;br /&gt;
Add the connection.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-Bj4jkjGB7Yk/UJRxEHJA5SI/AAAAAAAACLA/sI-OmDVwCKw/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="286" src="http://4.bp.blogspot.com/-Bj4jkjGB7Yk/UJRxEHJA5SI/AAAAAAAACLA/sI-OmDVwCKw/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;b&gt;Step 4:&lt;/b&gt;&lt;br /&gt;
Go to Source site, i.e., Main site collection in my case, and create a new content organizer rule.&lt;br /&gt;
&lt;br /&gt;
Give the Name to the rule.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-9-StoSM0424/UJRmgM_gS_I/AAAAAAAACJI/js401K4c_Ik/s1600/7.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" src="http://4.bp.blogspot.com/-9-StoSM0424/UJRmgM_gS_I/AAAAAAAACJI/js401K4c_Ik/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Select the Content type of the submissions, on which you want o apply this rule.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-W4jlVWmK8sE/UJRmhWFEnOI/AAAAAAAACJQ/5f-i5pTqr2M/s1600/8.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="148" src="http://2.bp.blogspot.com/-W4jlVWmK8sE/UJRmhWFEnOI/AAAAAAAACJQ/5f-i5pTqr2M/s640/8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
As we are targeting the destination out of the scope of current site, instead of selecting the list, we need to opt for "Another Content Organizer in Different site". A drop down will be there with all available external&amp;nbsp; Content Organizers, in our case "Tax Content Receiver".&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-gq4csEGBbw0/UJRzHdba4LI/AAAAAAAACLI/jOk5HEEgidY/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="142" src="http://3.bp.blogspot.com/-gq4csEGBbw0/UJRzHdba4LI/AAAAAAAACLI/jOk5HEEgidY/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Step 5:&lt;/b&gt;&lt;br /&gt;
With this, the Profiles added in Source site will be moved to destination's(Tax site) "Drop off Library".&lt;br /&gt;
One more step of configuring a Content Organizing rule to fetch records from Drop Off Library to Profiles Library.&lt;br /&gt;
&lt;br /&gt;
Perform similar steps as we did in step4, but select the local destination and select "Profile" library as destination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 6:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
Go to "Drop off Library" in your Source site, add a new item. Select the Picture, give other detials and select department as Tax.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-amt5ZIiqLGM/UJR0oC4l7TI/AAAAAAAACLQ/9Cv94Iq-rTc/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="609" src="http://2.bp.blogspot.com/-amt5ZIiqLGM/UJR0oC4l7TI/AAAAAAAACLQ/9Cv94Iq-rTc/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Once you click Submit, you will get a message as shown below, and the profile was saved to "Profiles" library in Tax site.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-ULygtSNK6sU/UJR48jov_jI/AAAAAAAACMI/X5ku_ZOEhN8/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="262" src="http://4.bp.blogspot.com/-ULygtSNK6sU/UJR48jov_jI/AAAAAAAACMI/X5ku_ZOEhN8/s640/8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;If you haven't performed the step 5, the confirmation message would be like below, and the profile will be saved to "Drop Off Library" in Tax Site.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-TzcdEKL_IFU/UJR0-YES4HI/AAAAAAAACLY/XbmGiQ2OI0M/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="280" src="http://4.bp.blogspot.com/-TzcdEKL_IFU/UJR0-YES4HI/AAAAAAAACLY/XbmGiQ2OI0M/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Open Tax site and Open "Profile" library. We had successfully organized content from main site to another site based on Managed Metadata.&lt;br /&gt;
&lt;b&gt;Result:&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-vnyCtB_hZeg/UJR6KhO5fZI/AAAAAAAACMQ/ZdcCdKswzTk/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="470" src="http://4.bp.blogspot.com/-vnyCtB_hZeg/UJR6KhO5fZI/AAAAAAAACMQ/ZdcCdKswzTk/s640/9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;&lt;b&gt;Note : &lt;/b&gt;We did Content Organizing only 1 site (Tax). So, you have to repeat this to handle multiple sites.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Is it helpful for you? Kindly let me know your comments / Questions.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/fHGVrmZsVY8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/2087551741653545081/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/11/content-organizer-metadata-routing-in.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/2087551741653545081?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/2087551741653545081?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/fHGVrmZsVY8/content-organizer-metadata-routing-in.html" title="Content Organizer / Metadata Routing in SP2010" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-w9mzLzL0LPM/UJRWbvtNCZI/AAAAAAAACG4/RD7WJgWao_M/s72-c/doc_mgmt.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/11/content-organizer-metadata-routing-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8ESHs-eSp7ImA9WhNSGEU.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-6319049861663691410</id><published>2012-11-02T01:13:00.002-07:00</published><updated>2012-11-02T12:16:49.551-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-02T12:16:49.551-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Managed Metadata in SP2010 - Simplified</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
&lt;br /&gt;
&lt;table style="width: 100%px;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="width: 20%;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-uHxfpJ4X6P8/UJLGBo5cgmI/AAAAAAAACCg/dVBNOGrqHPs/s400/metadata.jpg" width="200" /&gt;&lt;/td&gt;&lt;td style="width: 80%;"&gt;&lt;blockquote class="tr_bq"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Metadata is data about data.&amp;nbsp; &lt;/blockquote&gt;
Well Now you have to tell me wether answer is correct or not?&lt;br /&gt;
&lt;br /&gt;
If you understand above definition, the answer is "Correct".&lt;br /&gt;
The concept of metadata exists from ages, and we have been using it in .net assemblies and many other stuff.&lt;br /&gt;
&lt;br /&gt;
Lets take an example of exam report. It will have all the subjects listed and maximum marks, achieved marks, result and grade.&amp;nbsp; To summarize everything, we call it "Report Card".&lt;br /&gt;
&lt;br /&gt;
When you say "Report Card" , it signifies everything mentioned above. So "Report Card" is metadata using which we can classify all the Marks and grades information. &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Now lets see what metadata has to do with Sharepoint 2010.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
We know that everything in Sharepoint is a list.&lt;br /&gt;
Like the pages in a book, We want them organized and indexed. Just imagine a book without page numbers and indexes. Hard to read a specific data, right?&lt;br /&gt;
&lt;br /&gt;
Now, let me show you how it looks like in sharepoint. I have created a content type shown below.&lt;br /&gt;
&lt;i&gt;&lt;b&gt;UnMgdEmpLstContentType:&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-_6jZKb0vaJM/UJLLdr1ncpI/AAAAAAAACDM/VDq3xwT4Vqg/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="208" src="http://2.bp.blogspot.com/-_6jZKb0vaJM/UJLLdr1ncpI/AAAAAAAACDM/VDq3xwT4Vqg/s640/1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;Based on this i created a list "&lt;i&gt;&lt;b&gt;UnMgdEmpList&lt;/b&gt;&lt;/i&gt;". While adding the items, this is how the user will be prompted the inputs.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-SCgtmn46qQQ/UJLNSm4UGiI/AAAAAAAACDU/Xg-uZeTqmDQ/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="416" src="http://2.bp.blogspot.com/-SCgtmn46qQQ/UJLNSm4UGiI/AAAAAAAACDU/Xg-uZeTqmDQ/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
You may think whats the problem in that, lets see the complete list after adding 4 records by users.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-e54XrGmrT-4/UJLOMZ7DeDI/AAAAAAAACDk/x4Jwtey6us4/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="184" src="http://2.bp.blogspot.com/-e54XrGmrT-4/UJLOMZ7DeDI/AAAAAAAACDk/x4Jwtey6us4/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
Look at the records. All are Analysts from HR department, but look how distinct data they have provided.&lt;br /&gt;
Now to search these records from a list, i have to use multiple key words like "hr", "HR Depatment" or "Human Resource", which makes searching difficult for&amp;nbsp; user.&lt;br /&gt;
&lt;br /&gt;
Now, lest see a well managed content type. I can create a Content type with Department and Designation as choice fields, as we did it in 2007. problem solved?&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;"No"&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What if other developer is adding different choice items in his content type for the same department column?&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What if you want to add an option in department, and that choice field is already in 100 content types?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;This is where we need to look out for a centralized solution.&lt;br /&gt;
Before Jumping on to Managed metadata, we need to talk about new Taxonomy capabilities of SP2010.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;i&gt;&lt;b&gt; Taxonomy is nothing but terminology.&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&amp;nbsp;Let's say we are creating a site for a Insurance client, all you need to talk about is Sum insured, Terms, Policies, Claims&amp;nbsp; etc.&lt;br /&gt;
Instead of leaving such important data fields for direct user inputs, we have Term Store in SP2010, where the Administrator or Contributor can create a set of terms/Taxonomy that can be used across multiple content types across all sites.&lt;br /&gt;
&lt;br /&gt;
Lets Jump into Central Admin =&amp;gt; Application Management =&amp;gt; Manage Service applications&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-0QfyIAn5CD0/UJN2m2LitdI/AAAAAAAACEQ/gNvuGkRb0DM/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="152" src="http://3.bp.blogspot.com/-0QfyIAn5CD0/UJN2m2LitdI/AAAAAAAACEQ/gNvuGkRb0DM/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Click on Managed Metadata Service Application which will take you to &lt;b&gt;"Term Store Management Tool".&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-WRFMrYPQ7XQ/UJN5JGjEEdI/AAAAAAAACEo/suQpSfiHdtQ/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="392" src="http://4.bp.blogspot.com/-WRFMrYPQ7XQ/UJN5JGjEEdI/AAAAAAAACEo/suQpSfiHdtQ/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
The figure will explain almost everything about Term store, Term Sets and Terms.&lt;br /&gt;
Now lets see how to Manage Metadata using Term Store concept.&lt;br /&gt;
&lt;br /&gt;
Lets go to Content type and while creating the New Site Column "Department", opt for "Managed Metadata" instead of "Simple Line of Text".&lt;br /&gt;
Once you selected Managed metadata, the below fields will appear, from which you can select to which Term set , you want to bind specific column of a Content type.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-lWxm7Hht7hY/UJN8D6MTH3I/AAAAAAAACFo/6FSdFn2KOdE/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="282" src="http://3.bp.blogspot.com/-lWxm7Hht7hY/UJN8D6MTH3I/AAAAAAAACFo/6FSdFn2KOdE/s640/6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
This time the Conetet type will consists of Site columns which are not "single line of text". Instead we will have Managed Metadata binded to them.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-4_dXWWPmoG0/UJN8jABtUcI/AAAAAAAACFw/46QXji1c0Lg/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="296" src="http://2.bp.blogspot.com/-4_dXWWPmoG0/UJN8jABtUcI/AAAAAAAACFw/46QXji1c0Lg/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Now if i create a list, based upon this managed content type, this is how it will look when a user tries to add a record. Sharepoint will suggest the options available.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-u8Zo-eawQPM/UJN-XxDEDSI/AAAAAAAACF4/s7Jbf8SET-8/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="385" src="http://3.bp.blogspot.com/-u8Zo-eawQPM/UJN-XxDEDSI/AAAAAAAACF4/s7Jbf8SET-8/s640/9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Else you can select the item directly from the Options presented when you click the Metadata Tag on right to the field.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-ijM2bu4Kxmg/UJN-sb5I6uI/AAAAAAAACGA/Ozy_SdnAMtI/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="299" src="http://2.bp.blogspot.com/-ijM2bu4Kxmg/UJN-sb5I6uI/AAAAAAAACGA/Ozy_SdnAMtI/s640/8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Thus finally the records from a list with content type derived from Manged Metadata looks like this.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-cxvlIi30M9s/UJN_FCj6iYI/AAAAAAAACGI/nvzxdiamrlA/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://3.bp.blogspot.com/-cxvlIi30M9s/UJN_FCj6iYI/AAAAAAAACGI/nvzxdiamrlA/s640/10.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Looks simple. Right?&lt;br /&gt;
Yes but if you look at the bigger picture of Managed metadata, Below are the significant benefits of it.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #073763;"&gt;&lt;span style="font-size: large;"&gt;&lt;i&gt;&lt;b&gt;More consistent use of terminology&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Managed metadata facilitates more consistent use of terms, as well as more consistent use of the enterprise keywords that are added to SharePoint Server items. You can pre-define terms, and allow only authorized users to add new terms. You can also prohibit users from adding their own enterprise keywords to items, and require them to use existing ones. Managed metadata also provides greater accuracy by presenting only a list of correct terms from which users can select values. Because enterprise keywords are also a type of managed metadata, even the enterprise keywords that users apply to items can be more consistent.&lt;br /&gt;
&lt;br /&gt;
Because metadata is used more consistently, you can have a higher degree of confidence that it is correct. When you use metadata to automate business processes—for example, placing documents in different files in the record center based on the value of their department attribute—you can be confident that the metadata was created by authorized users, and that the value of the department attribute is always one of the valid values.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #073763;"&gt;&lt;span style="font-size: large;"&gt;&lt;i&gt;&lt;b&gt;Better search results&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
A simple search can provide more relevant results if items have consistent attributes.&lt;br /&gt;
&lt;br /&gt;
As users apply managed terms and enterprise keywords to items, they are guided to terms that have already been used. In some cases, users might not even be able to enter a new value. Because users are focused on a specific set of terms, those terms—and not synonyms—are more likely to be applied to items. Searching for a managed term or an enterprise keyword is therefore likely to retrieve more relevant results.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #073763;"&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Dynamic&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In previous versions of SharePoint Server, to restrict the value of an attribute to being one of a set of values, you would have created a column whose type is "choice", and then provided a list of valid values. When you needed to add a new value to set of choices, you would have to modify every column that used the same set of values.&lt;br /&gt;
&lt;br /&gt;
By using managed metadata in SharePoint Server 2010, you can separate the set of valid values from the columns whose value must be one of the set of valid values. When you need to add a new value, you add a term to the term set, and all columns that map to that term set would use the updated set of choices.&lt;br /&gt;
&lt;br /&gt;
Using terms can help you keep SharePoint Server items in sync with the business as the business changes. For example, assume your company's new product had a code name early in its development, and was given an official name shortly before the product launched. You included a term for the code name in the "product" term set, and users have been identifying all documents related to the product by using the term. When the product name changed, you could edit the term and change its name to the product's official name. The term is still applied to the same items, but its name is now updated.&lt;br /&gt;
&lt;br /&gt;
Is it helpful for you? Kindly let me know your comments / Questions.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/MhWHyXuFCyA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/6319049861663691410/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/11/managed-metadata-in-sp2010-simplified.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/6319049861663691410?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/6319049861663691410?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/MhWHyXuFCyA/managed-metadata-in-sp2010-simplified.html" title="Managed Metadata in SP2010 - Simplified" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-uHxfpJ4X6P8/UJLGBo5cgmI/AAAAAAAACCg/dVBNOGrqHPs/s72-c/metadata.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/11/managed-metadata-in-sp2010-simplified.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAFRXY4eip7ImA9WhNSFEk.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-6552233926299818236</id><published>2012-10-28T03:52:00.001-07:00</published><updated>2012-10-28T11:08:34.832-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-28T11:08:34.832-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Testing" /><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net" /><title>Load Test Using Visual Studio 2010</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
I have been writing code from last 7 years and&amp;nbsp;i hope many of us went through below situation.&lt;br /&gt;
We always test our code thouroughly, and will send it for testing expecting zero bugs.&lt;br /&gt;
When a tester raised an issue with anything, first thing that comes to our mind is . . &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-85yNSoKsXOo/UIz5RdOz13I/AAAAAAAAB_Y/_KGS6sAssEc/s1600/0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="196" src="http://2.bp.blogspot.com/-85yNSoKsXOo/UIz5RdOz13I/AAAAAAAAB_Y/_KGS6sAssEc/s320/0.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
After all the struggle we will make it to Production, and smoke test went awesome.&lt;br /&gt;
When the users start using the application . . .&amp;nbsp; "BOOM"&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-size: large;"&gt; Performance Issues . . . &lt;/span&gt;&lt;/blockquote&gt;
Most of us will have only one answer . . . &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-H4LASnyhxNg/UIz7RCYGDpI/AAAAAAAAB_g/EEFU8RQAL-A/s1600/0.1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-H4LASnyhxNg/UIz7RCYGDpI/AAAAAAAAB_g/EEFU8RQAL-A/s1600/0.1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
This is where we need to consider, certain factors. We do unit testing using Manual testing, N Unit testing, ect.&amp;nbsp;But, we need to perform a load test before stamping something as 100%&amp;nbsp;tested (or) before&amp;nbsp;moving it to production.&lt;br /&gt;
&lt;br /&gt;
We cannot&amp;nbsp;always depend on Loadtest performed by the testing team. So, its our responsibility that the code will work even under the expected load. So, we will see how we can perform a Load&amp;nbsp;Test Using Visual studio 2010 Ultimate.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1: &lt;/b&gt;Identify or Create a web application, for which you want to perform a Load test.&lt;br /&gt;
Here i have created a simple web application, with Login and Logout controls.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-GozwdwCHIfM/UIz_Fxe4orI/AAAAAAAACAM/90MTSPLLXdc/s1600/2.1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="451" src="http://3.bp.blogspot.com/-GozwdwCHIfM/UIz_Fxe4orI/AAAAAAAACAM/90MTSPLLXdc/s640/2.1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-G8zjgeEDWIM/UIz_G5pDHAI/AAAAAAAACAU/Ujejv40-72M/s1600/2.2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="451" src="http://1.bp.blogspot.com/-G8zjgeEDWIM/UIz_G5pDHAI/AAAAAAAACAU/Ujejv40-72M/s640/2.2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp; &lt;br /&gt;
&lt;b&gt;Step 2:&lt;/b&gt; I created a Test project with name LoadTestProject. Now in the first place i will add a Test file to this project. When you click "Add New", VS will present you with lot of options. Here we need to select a "Web Performance Test" for this scenario. I named it as "SingleUserPerfTest".&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-1RVz9K9xa8c/UI0AJ_wO78I/AAAAAAAACAc/P4bOB_0t40I/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="404" src="http://4.bp.blogspot.com/-1RVz9K9xa8c/UI0AJ_wO78I/AAAAAAAACAc/P4bOB_0t40I/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Step 3: &lt;/b&gt;Once you click Add, you will be presented with a explorer window with recording infrastructure.&lt;br /&gt;
All you need to do is, clcik the "Start Record" button and perform what are all actions/browse through pages you want to test.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-qzFjOyDjabQ/UI0A_WyTX0I/AAAAAAAACAk/uqendsTN_Sg/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="360" src="http://4.bp.blogspot.com/-qzFjOyDjabQ/UI0A_WyTX0I/AAAAAAAACAk/uqendsTN_Sg/s640/4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Step 4: &lt;/b&gt;Once you are done with all the stuff, click on Stop button. Visual studio will convert all the recorded steps into code, embedded into &lt;b&gt;.webtest&lt;/b&gt; file.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-GJqI_ttMw9k/UI0Bh3hfkXI/AAAAAAAACAs/zqA2cEJrNyU/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="236" src="http://3.bp.blogspot.com/-GJqI_ttMw9k/UI0Bh3hfkXI/AAAAAAAACAs/zqA2cEJrNyU/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
You can expand the nodes and see what are all the actions recorded, and what are the requests/responses generated while our webtest.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-cIXp4MSF7Es/UI0B9u52oRI/AAAAAAAACA0/eEmG1FT0Ubs/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-cIXp4MSF7Es/UI0B9u52oRI/AAAAAAAACA0/eEmG1FT0Ubs/s400/6.png" width="356" /&gt;&lt;/a&gt;&lt;/div&gt;
You can run this test by clicking the Left-Top button, but this will be equal to our unit test. We havent tested the response of application under load.&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 5: &lt;/b&gt;Now Add new test file to project. This time select a Load Test file from the menu. I named it as "SampleLoadTest".&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-pGFphQ6k4Bs/UI0CnbrgdrI/AAAAAAAACA8/eH55SLiOLQg/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="406" src="http://3.bp.blogspot.com/-pGFphQ6k4Bs/UI0CnbrgdrI/AAAAAAAACA8/eH55SLiOLQg/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Once you clcik Add button, you will be presented with a wizzard, using which you will configure the Load test.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 6:&lt;/b&gt; As a first step, we will name the scenario, and will setup think time for the profiles.&amp;nbsp; In the rel time scenario, the users will take 1 to 3 seconds between performing one action after another, either due to reading webpage or thinking. This delay will be created while load test using "Think Time" specified below.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-8u7vdHnsacY/UI0DyyMBUjI/AAAAAAAACBE/4G07mWV1OVw/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="384" src="http://2.bp.blogspot.com/-8u7vdHnsacY/UI0DyyMBUjI/AAAAAAAACBE/4G07mWV1OVw/s640/8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Step 7:&lt;/b&gt; In next step you will be selecting the load pattern. Wheter you want to apply a constant load or increase the load in a cumilative way. These variables can be configured here.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-tOJ4qloQOXY/UI0FH9mUMKI/AAAAAAAACBM/0NmGT3tUUNg/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="384" src="http://2.bp.blogspot.com/-tOJ4qloQOXY/UI0FH9mUMKI/AAAAAAAACBM/0NmGT3tUUNg/s640/9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Step 8:&lt;/b&gt; Now, you have to select the Individual webtest(s) you have created earlier, which need to be considered under this load test.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-ff-KW-WAg8A/UI0FmqvqTXI/AAAAAAAACBU/BXLmSKR4eQI/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="454" src="http://1.bp.blogspot.com/-ff-KW-WAg8A/UI0FmqvqTXI/AAAAAAAACBU/BXLmSKR4eQI/s640/10.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;&lt;b&gt;Step 9:&lt;/b&gt; Here you can select either for how much time you want to run the test, or how many iterations of test you want to perform.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-eM1rJpMiuYc/UI0F949Fy0I/AAAAAAAACBc/6fI85OJefB4/s1600/11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="384" src="http://2.bp.blogspot.com/-eM1rJpMiuYc/UI0F949Fy0I/AAAAAAAACBc/6fI85OJefB4/s640/11.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Step 10:&lt;/b&gt; Once you clcik "Finish" button, all the configuration will be emebeded in to the Load test file. You can clcik on each specific step/ configuration, and can modify the values in property window.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-JhV2qNCkBTc/UI0Gap-J-EI/AAAAAAAACBk/P6Bd1PzTxB4/s1600/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-JhV2qNCkBTc/UI0Gap-J-EI/AAAAAAAACBk/P6Bd1PzTxB4/s400/12.png" width="278" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Step 11:&lt;/b&gt; We are all set now. Click the "Run Test" button on Top-Left corner and see what happens.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-jTV-KClKeOE/UI0GvOJYCDI/AAAAAAAACBs/bLZKldA4u-8/s1600/13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-jTV-KClKeOE/UI0GvOJYCDI/AAAAAAAACBs/bLZKldA4u-8/s640/13.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
All the key factors will be presented graphically while performing the load test. We can figure-out different factors and thier variation patterns under load conditions.&lt;br /&gt;
&lt;br /&gt;
Finally after completion of test, a test result document will be created using which you can analyze what are the stress factors where we need the performace tuning.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-nMbkO4qaezo/UI0HwspPjdI/AAAAAAAACB0/zZBGy1_Sw_k/s1600/14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="306" src="http://3.bp.blogspot.com/-nMbkO4qaezo/UI0HwspPjdI/AAAAAAAACB0/zZBGy1_Sw_k/s640/14.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
These test results can also be stored into database by configuring the controller conncetion string.&lt;br /&gt;
&lt;br /&gt;
Download Sample Code: &lt;a href="https://skydrive.live.com/?cid=56F6D80369352266&amp;amp;id=56F6D80369352266!103" target="_blank"&gt;Sample Load Test Project&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Is it helpful for you? Kindly let me know your comments / Questions.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/Olkred4BVqs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/6552233926299818236/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/10/load-test-using-visual-studio-2010.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/6552233926299818236?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/6552233926299818236?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/Olkred4BVqs/load-test-using-visual-studio-2010.html" title="Load Test Using Visual Studio 2010" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-85yNSoKsXOo/UIz5RdOz13I/AAAAAAAAB_Y/_KGS6sAssEc/s72-c/0.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/10/load-test-using-visual-studio-2010.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4EQHo9fSp7ImA9WhNTE00.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-2806569259562392533</id><published>2012-10-15T00:58:00.001-07:00</published><updated>2012-10-15T05:41:41.465-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-15T05:41:41.465-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Webparts in Sharepoint 2010</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="http://www.codeproject.com/" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;
In this post we will see a few commonly used webaprts in Sahrepoint 2010.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Content Editor Webpart: &lt;/b&gt;This webpart will be used for authoring rich content.This will be available in Media and Content section.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
Here is an example, i have added a content editor webpart, and added some text, images, Links, Files to it, you can see the options available on the top. For example if you want to create a simple html menu on the page, use it.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-9U1tr0e5VfA/UHaFtRQW7MI/AAAAAAAAB4U/rQlBOyFwTSU/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="330" src="http://3.bp.blogspot.com/-9U1tr0e5VfA/UHaFtRQW7MI/AAAAAAAAB4U/rQlBOyFwTSU/s400/1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;You can even edit the content in a html editor using the "Format Text" ribbon options.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-UA5VtLSpMZg/UHaN-cM-JFI/AAAAAAAAB4w/UECpaYvnAdc/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="138" src="http://3.bp.blogspot.com/-UA5VtLSpMZg/UHaN-cM-JFI/AAAAAAAAB4w/UECpaYvnAdc/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;2. Media Webpart : &lt;/b&gt;This webpart is a best pick to host media elemnts like video or Images.&lt;br /&gt;
Once you add Media webpart to page and enter edit mode of webpart, you can see options to add a video or images.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-moNLfhDnqgY/UHbeVYM9dhI/AAAAAAAAB5M/Mm4UCU_ftdg/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="358" src="http://1.bp.blogspot.com/-moNLfhDnqgY/UHbeVYM9dhI/AAAAAAAAB5M/Mm4UCU_ftdg/s400/4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
Once you did it, here is the result . . .&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-GU080DLu6ko/UHbebyJkhOI/AAAAAAAAB5U/p7amDF4jYxM/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="241" src="http://1.bp.blogspot.com/-GU080DLu6ko/UHbebyJkhOI/AAAAAAAAB5U/p7amDF4jYxM/s320/3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;3. Page Viewer Webpart:&lt;/b&gt; If you have a webpage wither internal/external as a part of the web part page, Page Viewer webpart is a best pick for it. An example is shown below.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-sEyrCIdoMm0/UHbhD2B63BI/AAAAAAAAB5w/V1ywhxerslg/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://4.bp.blogspot.com/-sEyrCIdoMm0/UHbhD2B63BI/AAAAAAAAB5w/V1ywhxerslg/s640/5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;4. Silverlight Webpart:&lt;/b&gt;&amp;nbsp; Silverlight means rich and powerful applications. Now you can intigrate it at a webpart level using Silverlight webpart. Once you deployed the silverlight application (.xap) to site, just add this webpart to page and specify the silverlight application url in the dialog.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Jf4Va-j64vE/UHbl9Eb9KbI/AAAAAAAAB6M/owtr1w2eB-g/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="177" src="http://3.bp.blogspot.com/-Jf4Va-j64vE/UHbl9Eb9KbI/AAAAAAAAB6M/owtr1w2eB-g/s400/6.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;5. Business Data Webparts : &lt;/b&gt;I have a external content type and there are few actions defined on it using which i can read, write data on to external system. For example i have created a BSC Entity with details and 2 actions defined on it. Now, we will see a few Business Data web parts and how the dispaly gona vary. You will have the flexibility to modify the display using XSLT as well.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Business Data List:&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-Rrmtp1VDZXs/UHbwqyLv5NI/AAAAAAAAB6o/G07fL0RZghQ/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="170" src="http://2.bp.blogspot.com/-Rrmtp1VDZXs/UHbwqyLv5NI/AAAAAAAAB6o/G07fL0RZghQ/s640/7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;Business Data Item:&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-3_NrqjuS2d4/UHbwrg-rt7I/AAAAAAAAB6s/heCuL64-lAM/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="138" src="http://4.bp.blogspot.com/-3_NrqjuS2d4/UHbwrg-rt7I/AAAAAAAAB6s/heCuL64-lAM/s400/8.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;Business Data Actions:&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-YPdVUfLyZ1A/UHbwsd-ml9I/AAAAAAAAB60/V4pYfNnuB5s/s1600/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-YPdVUfLyZ1A/UHbwsd-ml9I/AAAAAAAAB60/V4pYfNnuB5s/s1600/9.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;b&gt;6. Chart Webpart: &lt;/b&gt;Even though its part of Business Data webparts, it has wide range of functionality, so it worth to preset as a seperate webpart.&lt;br /&gt;
As the name depicts, this webpart is used to display the data in a graphical represntation. Once the web part is selected on to webpart page, you will be presented with options to select the data source.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&amp;nbsp;&lt;i&gt;&lt;b&gt;Step 1:&lt;/b&gt;&lt;/i&gt; Add web part.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/-4GpEbn5pz6M/UHb0QEVO8zI/AAAAAAAAB7U/jgRH6N6vbdQ/s1600/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-4GpEbn5pz6M/UHb0QEVO8zI/AAAAAAAAB7U/jgRH6N6vbdQ/s320/10.png" width="253" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;i&gt;Step 2:&lt;/i&gt; &lt;/b&gt;Select the data source.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-B-3sRCn7Qtk/UHb0Q25r_0I/AAAAAAAAB7Y/KYajlzfq3Fg/s1600/11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="242" src="http://1.bp.blogspot.com/-B-3sRCn7Qtk/UHb0Q25r_0I/AAAAAAAAB7Y/KYajlzfq3Fg/s640/11.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;Step 3: &lt;/b&gt;&lt;/i&gt;Choose the axis elements from data feilds.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-95Xqv7S2ErY/UHb0R_NEwhI/AAAAAAAAB7k/NfjXPy0To-Y/s1600/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="168" src="http://3.bp.blogspot.com/-95Xqv7S2ErY/UHb0R_NEwhI/AAAAAAAAB7k/NfjXPy0To-Y/s320/12.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;&lt;b&gt;Step 4:&lt;/b&gt;&lt;/i&gt; Modify the other display elemnts and the final disply of&amp;nbsp; LandCost chart webpart is here.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/--XAorFS0N_s/UHb0S7MywsI/AAAAAAAAB7o/qIOcQLFeXS4/s1600/13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/--XAorFS0N_s/UHb0S7MywsI/AAAAAAAAB7o/qIOcQLFeXS4/s400/13.png" width="295" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;7. Infopath Form Webpart: &lt;/b&gt;This is a brand new webpart in SP2010. This is a best pick if you want to display Infopath enabled / editable Lists or libraries. You can create all three kinds of infopath documents and can display all "Create", "Edit" and "Display List" forms. What to be displayed, that you have to select from Edit Webpart windows as shown below.&lt;br /&gt;
I have a infopath editform enabled for list named "Land Cost". For which we created a Infopath form webpart.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-KwfIYGUFHWE/UHuGkL1aALI/AAAAAAAAB8I/42cIXX1XOMM/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-KwfIYGUFHWE/UHuGkL1aALI/AAAAAAAAB8I/42cIXX1XOMM/s400/1.png" width="270" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;i&gt;&amp;nbsp;Web part displaying Edit - Infopath form for Land Cost list:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Y8pIRaqxKOo/UHuGk6VP7uI/AAAAAAAAB8M/mLMbihkTzqU/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="131" src="http://3.bp.blogspot.com/-Y8pIRaqxKOo/UHuGk6VP7uI/AAAAAAAAB8M/mLMbihkTzqU/s640/2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;8. Content Query Webpart : &lt;/b&gt;The Content Query Web Part is available for pages on sites in which the publishing infrastructure feature has been activated. Probably the most common use of the Web Part is to roll up information from multiple lists into a single view. You can apply filters and styles to make the content look the way you want. Imagine you have a publishing page that displays a certain article and you want to display a list of related stories next to it on the page. Using the Content Query Web Part, you can search all the lists on the site that use the same keywords as the keywords for the featured article, and display them in a list.&lt;br /&gt;
For exmaple i created a simple list content type called consumer and a list created based on that content type.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-5OFS5qXXqts/UHu1yzAGleI/AAAAAAAAB88/aCLRCyjlNME/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="114" src="http://1.bp.blogspot.com/-5OFS5qXXqts/UHu1yzAGleI/AAAAAAAAB88/aCLRCyjlNME/s640/3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now go to Webpart page and add a web part and select "Content Query" webpart from content rollup section.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Plq5PQiifJY/UHu4z2sqw_I/AAAAAAAAB9k/vlhpc09TeqM/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="65" src="http://3.bp.blogspot.com/-Plq5PQiifJY/UHu4z2sqw_I/AAAAAAAAB9k/vlhpc09TeqM/s400/4.png" width="400" /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&amp;nbsp;Now, click on Open the tool pane link and configure the list on which the webpart should operate.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-llNadMFZ3GM/UHu40jE_rjI/AAAAAAAAB9s/BjPjo_7Xj34/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-llNadMFZ3GM/UHu40jE_rjI/AAAAAAAAB9s/BjPjo_7Xj34/s400/5.png" width="242" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Once you click ok, you will see the webpart getting populated with the first column of the list, which may not be the desired result everytime. So, go to Presentation part of content query properties window, and change the "Fields to Display" part of configuration.&lt;br /&gt;
&lt;br /&gt;
There are other parts of the configuration, where you can control the query which can control the results fetched under Filters section and the way to display can be controled using Grouping and Sortin section.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-KwMj0MF4WTA/UHu6oB0J-vI/AAAAAAAAB-c/n-tvurGnziA/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="332" src="http://2.bp.blogspot.com/-KwMj0MF4WTA/UHu6oB0J-vI/AAAAAAAAB-c/n-tvurGnziA/s400/7.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;Finally the results will be displayed on the Content Query webpart.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-2kuauDpmdKY/UHu8MrR6diI/AAAAAAAAB-o/0yKRHrUDiSo/s1600/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="219" src="http://2.bp.blogspot.com/-2kuauDpmdKY/UHu8MrR6diI/AAAAAAAAB-o/0yKRHrUDiSo/s640/8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
These are the few commonly used out-of-box webparts. We will see search webparts in a seperate post.&lt;br /&gt;
Kindly let me know if you want anything other webparts which you have used that need to be listed in this post. Thanks.&lt;br /&gt;
&lt;br /&gt;
Is it helpful for you? Kindly let me know your comments / Questions.&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/y4dkWtG-2HM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/2806569259562392533/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/10/webparts-in-sharepoint-2010.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/2806569259562392533?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/2806569259562392533?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/y4dkWtG-2HM/webparts-in-sharepoint-2010.html" title="Webparts in Sharepoint 2010" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-9U1tr0e5VfA/UHaFtRQW7MI/AAAAAAAAB4U/rQlBOyFwTSU/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/10/webparts-in-sharepoint-2010.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYMQnczfip7ImA9WhJaFU4.&quot;"><id>tag:blogger.com,1999:blog-4208378482021219922.post-2464559398487235107</id><published>2012-10-06T07:03:00.000-07:00</published><updated>2012-10-06T07:03:03.986-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-06T07:03:03.986-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint" /><title>Business Connectivity Services - Architecture</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Before comparing BDC vs BSC, one should know that BDC is still a part of SP 2010. It is integral part of Business Connectivity Services (BCS).&lt;br /&gt;
&lt;br /&gt;
One should understand BSC Architecture, before practically implementing it. So, as usually MSDN has everything, and let me bring it on to a post.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-95FiFfdNR-c/UHA5bRvAe2I/AAAAAAAAB34/tWLJ5Y8lgW8/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-95FiFfdNR-c/UHA5bRvAe2I/AAAAAAAAB34/tWLJ5Y8lgW8/s1600/1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;

          &lt;strong&gt;A:&lt;/strong&gt; The Business Data Connectivity service 
(BDC service) provides a means for storing and securing external content
 types and related objects. An external content type defines the 
following:&lt;br /&gt;

        &lt;ul&gt;
&lt;li class="unordered"&gt;
            A named set of fields of data, such as "customer."&lt;br /&gt;&lt;/li&gt;
&lt;li class="unordered"&gt;
            The operations for interacting with the data's external system, such as read, write, and create.&lt;br /&gt;&lt;/li&gt;
&lt;li class="unordered"&gt;
            The connectivity information that lets solutions that use the external content type connect to the external system.&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;B:&lt;/strong&gt; External content types are stored in a dedicated Business Data Connectivity service database.&lt;br /&gt;

        
          &lt;strong&gt;C:&lt;/strong&gt; The Secure Store Service securely stores 
credential sets for external systems and associates those credential 
sets with identities of individuals or with group identities. A common 
scenario for the Secure Store Service is a solution that authenticates 
against an external system in which the current user has a different 
account for authentication on that external system. When used with 
Business Data Connectivity service, the Secure Store Service provides a 
way to authenticate users and groups on external data sources.&lt;br /&gt;

        
          &lt;strong&gt;D:&lt;/strong&gt; Credential sets that the Secure Store Service uses are stored in a dedicated, secure database.&lt;br /&gt;

        
          &lt;strong&gt;E:&lt;/strong&gt; The Business Data Connectivity Server 
Runtime on front-end SharePoint servers uses the Business Data 
Connectivity data to connect to external systems and execute operations 
on the external systems for access by thin clients such as Web browsers.
 &lt;br /&gt;

        
          &lt;strong&gt;F:&lt;/strong&gt; The BCS Package Store holds the deployable
 Microsoft Business Connectivity Services packages that contain 
information that Microsoft Business Connectivity Services and Office 
applications need to interact with the external systems from rich 
clients.&lt;br /&gt;

        
          &lt;strong&gt;G:&lt;/strong&gt; The Business Data Connectivity service 
supports connecting to relational databases, Web services, Windows 
Communication Foundation (WCF) services, .NET connectivity assemblies, 
and custom data connectors that comply with the requirements of 
Microsoft Business Connectivity Services.&lt;br /&gt;

        
          &lt;strong&gt;H:&lt;/strong&gt; SharePoint Web sites use Business Data Web
 parts and SharePoint external lists to interact with external data that
 Microsoft Business Connectivity Services expose.&lt;br /&gt;

        
          &lt;strong&gt;I:&lt;/strong&gt; When users connect to an external list, a BCS package is downloaded to the client computers.&lt;br /&gt;

        
          &lt;strong&gt;J:&lt;/strong&gt; On supported Office clients (Microsoft 
SharePoint Workspace, Microsoft Outlook, and Microsoft Word), the Office
 Integration Client Runtime acts as a connector between Microsoft 
Business Connectivity Services running on the client and Office 
applications.&lt;br /&gt;

        
          &lt;strong&gt;K:&lt;/strong&gt; The Business Data Connectivity Client 
Runtime, on client computers, uses the Business Data Connectivity 
service data and Secure Store Service data to connect to and execute 
operations on external systems for access by supported rich clients.&lt;br /&gt;

        
          &lt;strong&gt;L:&lt;/strong&gt;
          Business Data Connectivity service data and Secure Store Service data is cached on client computers. &lt;br /&gt;

        
          &lt;strong&gt;M:&lt;/strong&gt; The Business Data Connectivity Runtime, on
 client computers, supports connecting to SQL Server and other 
relational databases, Web services, and custom data connectors that 
comply with the requirements of the Microsoft Business Connectivity 
Services.&lt;br /&gt;

        
          &lt;strong&gt;N:&lt;/strong&gt; The client cache refresh synchronizes the 
cache with the Microsoft Business Connectivity Services data and Secure 
Store Service data. &lt;br /&gt;

        
          &lt;strong&gt;O:&lt;/strong&gt; The Client Secure Store enables end users to configure their client mappings in the credential database.&lt;br /&gt;

        
          &lt;strong&gt;P:&lt;/strong&gt; Solution developers can use Microsoft 
SharePoint Designer 2010 and Visual Studio 2010 to create external 
content types and BDC models.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Is it helpful for you? Kindly let me know your comments / Questions.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/AspiringArchitect/~4/133pZy6jvtU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pratapreddypilaka.blogspot.com/feeds/2464559398487235107/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pratapreddypilaka.blogspot.com/2012/10/business-connectivity-services.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/2464559398487235107?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4208378482021219922/posts/default/2464559398487235107?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AspiringArchitect/~3/133pZy6jvtU/business-connectivity-services.html" title="Business Connectivity Services - Architecture" /><author><name>Pratap Reddy Pilaka</name><uri>http://www.blogger.com/profile/17141976956878163883</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://2.bp.blogspot.com/-_C9gcJWHma4/T_T-Jg3RSgI/AAAAAAAABsY/lRZf8lCAy-c/s220/ProfilePicture1.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-95FiFfdNR-c/UHA5bRvAe2I/AAAAAAAAB34/tWLJ5Y8lgW8/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pratapreddypilaka.blogspot.com/2012/10/business-connectivity-services.html</feedburner:origLink></entry></feed>
