Monday, July 14, 2014

master page


1. Prepare your html design first.
2. Move styles,scripts and images to appropriate places in sharepoint
styles,scripts->style library
images->images

Default MasterPages:
======================
MOSS 2007-default.master
SP 2010-v4.master,minimal.master,default.master - will give 2007 user interface in 2010
SP2013-seattle.master, oslo.master

3. Adjust the styles, script and images links in html code
4. Open SharePoint Designer 2013->open site->give url
5. click on masterpages->copy seattle.master and paste
6. rename pasted file as hayathi.master
7. right click on hayathi.master->checkout->again right click->Edit file in advanced mode
8. find s4-workspace-> then below that find s4-bodyContainer and hide it by using style="display:none"
9. copy your html body code and paste in between s4-workspace and bodycontainer.
10. go to head and configure styles and scripts.
11. hide s4-ribbonrow style="display:none"
12. hide suitebar
13. find PlaceHolderMain contentplaceholder and cut and paste into your design,
where you want to have child page

Tuesday, July 8, 2014

STSADM Commands for Solutions and Features

STSADM Commands for Solutions and Features

Working with Solutions


stsadm –o addsolution –filename “D:\Deploy\MySharePointSolution.wsp
We used the following command to deploy the solution once installed to a specific web application:
stsadm –o deploysolution –name MySharePointSolution.wsp –url http://myspwebappp –allowgacdeployment –immediate
If we would upgrade an existing solution, we would use the following:
stsadm –o upgradesolution –name MySharePointSolution.wsp –filename “D:\Deploy\MySharePointSolution.wsp” -immediate
And finally, we used the following commands to retract and delete a specific solution from the web application:
stsadm –o retractsolution –name MySharePointSolution.wsp –url http://myspwebapp –immediate
stsadm –o deletesolution –name MySharePointSolution.wsp
Now, let us see how we could do above operations with PowerShell. For this, we use the following PowerShell commands:
Add-SPSolution “D:\Deploy\MySharePointSolution.wsp
Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp–GACDeployment
If you would like to add the solution as sandboxed, you would use the Install-SPUserSolution command instead. To upgrade a solution, we specify which solution is to be updated and with which new solution file:
Update-SPSolution –Identity MySharePointSolution.wsp –LiteralPath “D:\Deploy\MySharePointSolution.wsp” –GacDeployment
To retract and remove a solution, we use the following commands:
Uninstall-SPSolution –Identity MySharePointSolution.wsp –WebApplicationhttp://myspwebapp
Remove-SPSolution–Identity MySharePointSolution.wsp

Working with features

Similarly, commands exist for working with features. The stsadm equivalents:
stsadm –o activatefeature –name MyFeatureName –url http://myspwebapp
stsadm –o deactivatefeature –name MyFeatureName –url http://myspwebapp
Needless to say, there are easy equivalents in PowerShell:
Enable-SPFeature –Identity MyFeatureNameOrGuid –url http://myspwebapp
Disable-SPFeature –Identity MyFeatureNameOrGuid –url http://myspwebapp

Monday, July 7, 2014

Configure external site as content sources in sharepoint search

Configure external site as content sources in sharepoint search:

We can search the external sites content using the SharePoint search just by creating new content source. Follow below steps:
  1. On the Home page of the SharePoint Central Administration Web site, in theApplication Management section, click Manage service applications.
  2. On the Manage Service Applications page, click Search Service Application.
  3. On the Search Administration Page, in the Crawling section, click Content Sources.

                    

After clicking on the link you will be redirected to the page where all the available content sources are displayed.

                   

To create a content source

  1. On the Manage Content Sources page, click New Content Source.
  2. On the Add Content Source page, in the Name section, in the Name box, type a name for the new content source as “External Sites”.
  3. In the Content Source Type section, select the “Web Sites”.
  4. In the Start Addresses section, in the Type start addresses below (one per line)box, type the URLs from which the crawler should begin crawling. For example:http://example.internetsite.com
  5. In the Crawl Settings section, select “Only crawl within the server of each start address”.
  6. In the Crawl Schedules section, to specify a schedule for full crawls, select a defined schedule from the Full Crawl list. A full crawl crawls all content that is specified by the content source, regardless of whether the content has changed. To define a full crawl schedule, click Create schedule.
  7. To specify a schedule for incremental crawls, select a defined schedule from theIncremental Crawl list. An incremental crawl crawls content that is specified by the content source that has changed since the last crawl. To define a schedule, clickCreate schedule.You can change a defined schedule by clicking Edit schedule.
  8. To prioritize this content source, in the Content Source Priority section, on thePriority list, select Normal or High.
  9. To immediately begin a full crawl, in the Start Full Crawl section, select the Start full crawl of this content source check box, and then click OK.
                       
This finishes creation of the new content source for external sites. But not all the internet facing sites allows anonymous access to its content. So there must be some place where we can configure the rules for the Urls which allows us to enter the credentials to access the content of site while crowing.
So navigate to Search Service Application > Crawl rules.
Click on the option “New Crawl Rule”
         
Path: Mention the internet site Url under the path section.
Crawl configuration: Select the “Include all items in this path” option.
Specify Authentication: Select “Specify a different content access account”. Enter the site credentials.
                     
Click Ok.
Next and last step is to crawl the content source “External Sites”. This will allow SharePoint can crawl the external site content

Wednesday, July 2, 2014

Limitations of Sandboxed Solutions in SharePoint 2010



- Since Sandboxed solutions are site collection specific, so you can not access data from other site collections. You can only access resources within the same site collection.

- You can not use SPSecurity.RunWithElevatedPrivileges method in case of Sandboxed solution.

- Executing code within Sandboxed solution causes a little performance overhead. Also Sandbox worker processes are terminated if they run for more than 30 seconds.

- Logging functionality is unavailable within the sandbox environment. Sandboxed solutions cannot write entries to the Windows Event log or the Unified Logging Service (ULS) trace log. 

- You cannot read configuration settings from or write configuration settings to the Web.config file.

- You can store and retrieve settings in the SPWeb.AllProperties hash table, but you cannot use property bags at any level of the SharePoint hierarchy.

- You cannot read or write settings to the hierarchical object store, because you do not have access to an SPWebApplication object or an SPFarm object.

- You can read or write settings to a SharePoint list within the same site collection not to other site collection.

- In case of deployment you can not deploy any files to the server file system in Sandboxed solutions.