Showing posts with label Sharepoint 2010. Show all posts
Showing posts with label Sharepoint 2010. Show all posts

Wednesday, November 20, 2013

Difference between Cumulative updates, Service Packs and Public Updates

While applying the updates in SharePoint I have a lot of confusion every time in Cumulative Updates, Service Packs and Public updates. By going through articles in TechNet and some of blog posts, i have found the following differentiation among them.

Service Pack:
It’s an update or combination of previous updates helps to make our product more reliable. It includes new fixes, functionality additions and all fixed that released previously (means Previous Service packs, Cumulative updates). That means if MS people released a service pack recently means that contains all the list of features up to date.

Service packs will not be multilingual. We have to download and install separate service packs for each installed language. We must install service packs for specific product as soon as possible. Microsoft provides all the latest fixes and updates in Service pack. There are no prerequisites for Service pack installations because each service pack includes all the recent updates from product release. Service Packs will not release frequently.

Cumulative Update (CU):
Cumulative update is collection of all the hot-fixes up to date. Generally Office hot fixes are released for every two months in a package. It includes fixes for all the issues collected from hot-fix accepted criteria that related to customer impact or reproducible. 

Cumulative update also includes critical on-demand hot fixes and security updates. It includes all the previous cumulative updates and public updates from previous service pack release. Cumulative updates are multilingual. It includes fixes for all languages. To install CU in our machine,, we have to install recent service pack related to that product (If released). 

Generally cumulative updates are not mandatory to install. We can install them to fix any issue. While downloading CU itself we can see the applicable scenarios in KB article page. There is lot of chances to affect the system. So we have to check before installation or advised by Microsoft people support to install. Cumulative updates releases frequently for a second month like (Feb, April, June, Aug, Oct, Dec)

Public Update and Critical On Demand:
Public update includes product fixes that applicable to large number of customers. Public update also applies for multilingual. To install public update we have to install most recent service pack if released. Sometimes Public Updates may have prerequisites for Cumulative updates also.  Public Update includes security fixes and it is recommended to install ASAP.

Critical On Demand will applicable for less number of customers facing critical problem. It will applicable for a specific problem or issue. COD is not multilingual. We have install COD’s on Microsoft people recommendations only.

Tuesday, October 29, 2013

Cache profiles in SharePoint

SharePoint adds caching mechanism with output caching that is available in ASP.Net 2.0. It contains Cache profiles that we can name and apply the pages and page items, content types and levels of scales in the development environment.

By using cache profiles we can control the quality level of the output caching in SharePoint site. It will allow or disallow site owners to choose their cache profiles. We can manage the user access permissions to SharePoint depending on the access to the site. Output cache renders the page, same way for users in same right. After creating and deploying the cache profile, any change that affects the cache profile will affects all the content access of the profile.

To enable output cache settings,
Navigate to Site Settings menu and click on Site Collection Output cache in Site Collection Administration section


In the Output Cache Settings page, check Enable output cache check box to enable output cache.



Select cache profile for anonymous from Anonymous Cache Profile list. This applies for anonymous users access for a site in Site Collection. To choose authenticated users from Authenticated Cache profile list. This will apply for authenticated users to access in a site in the Site Collection. To display additional cache information on the site collection pages that including the date and time of the page rendered earlier select Enable debug cache information on pages.

To create new caching profiles,
Navigate to Site Setting menu in SharePoint site. Click on Site collection cache profiles in Site Collection Administration.


Click on New to Create new cache profile.


Provide Title, Display Name, Description for Cache profile in Title, Display name Display Description columns. To ensure that all items in the cache are security trimmed check “Perform ACL Check” check box. To enable the cache, check “Enabled” check box. Enter Duration to specify the number of seconds to keep the cached version available. Check for changes will validates the page requests that the site has and to flush the cache. If we unchecked this system will not check for the updates on the sites.



Vary by custom parameter, Vary by HTTP Header and Vary by User Rights will specifies the values described in the ASP.Net cache policy. By selecting Vary by User Rights, we can ensure that users will have effective rights on the SharePoint site that having on the cached page. Select any value in Cacheability drop down  Select the policies to allow the authenticated users and page layout designers to apply authenticated scenarios. Check “Allow Writers to View Cached Content” to not allowing people with edit rights to cache their pages.


Friday, October 4, 2013

Add BCC to SharePoint designer workflow

In SharePoint designer 2010, workflow to send emails, we cannot find BCC (Blind Carbon Copy) column. We can see only To and CC (Carbon Copy) options with Subject and Body. 


If we have the requirement to include users in BCC, we can do that by using the steps below,
Complete the Send Mail activity and click on OK. Select Email task in the workflow, click on “Advanced Options” on the top of the ribbon.


We can see “Send an Email Properties” window. In BCC column we can add users to include BCC. Browse users in workflow click on (…) on BCC Column. Add users and click on OK. Click on Ok to close “Send an Email…” window.



Save and publish workflow.

Friday, March 22, 2013

Share Point Managed Paths


In Share point we have Managed paths for web applications. When we create a new site collection in a web application by default root site collection will be created with web application URL. Remaining site collections will create using '/site' managed path. If we want to create a site collection with the name 'test' it will take next to '/site' managed path. We can create our own managed paths in share point instead of existing.

In SharePoint 2010, "Central Administration -> Application Management--> Manage Web Applications--> 'By selecting the web application On the Top ribbon you can see the option managed paths'". You can create your own managed paths.




By default you can see two managed paths, (root) (Explicit inclusion) , sites (Wildcard inclusion). 

Explicit inclusion and Wildcard inclusion:

In explicit inclusion, you can't create more than one site collection under that managed path. For Example you have created a explicit managed path 'MyExplicitPath', You can create only one site collection, like "http://Servername:9090/MyExplicitPath", You don't have any option to create one more site collection. You can see this in the image below.




As shown the above image, you can see only one site collection with 'MyExplicitPath' managed path.


In wildcard inclusion, you can have option to create multiple site collections with the managed path. For example, you have created a managed path 'MyWildCardPath', you can add multiple site collection under http://servername:9090/MyWildCardPath/SiteCollection1http://servername:9090/MyWildCardPath/SiteCollection2http://servername:9090/MyWildCardPath/SiteCollection3....



As shown in the above image wildcard inclusion will allow text box after managed path. So that we can create multiple site collections.

we can choose Explicit inclusion to create site collections with unique site collection under a managed path and Wildcard inclusion to create multiple site collections under a managed path.

Monday, March 18, 2013

SharePoint - Check list exists or not in a site using Trygetlist() method

In SharePoint, most of the data operations can be done through List\ Library. We can access the list in SPObjectModel to get the data. If site doesn't contain any list with given name, it will return null reference exception. To fix that we have a methods in SPObjectModel, TryGetList(String List Name).

Here is the code to analyse the both methods
  
SPList currentList=null;
using (SPSite currentSite = new SPSite("http://servername:5656"))
{
       using (SPWeb currentWeb = currentSite.OpenWeb())
       {
             currentList = currentWeb.Lists["MyList"];
          if(currentList!=null)
          {
                    Console.WriteLine(currentList.Title);
                    Console.ReadKey();
          }
       }
}
in the above code, if there is no list with name "MyList", it will return null reference exception in line SPList currentList = currentWeb.Lists["MyList"];  to avoid this we will write the code placing the line in try, catch block. But it is not a good to code to place try catch blocks regularly.

 In SPObjectModel we have a built in method "TryGetList(string List Name). If there is list with given name, it will return SPList object. If there is no list with given name it will return null.
  
SPList currentList=null;

using (SPSite currentSite = new SPSite("http://servername:5656"))
{
      using (SPWeb currentWeb = currentSite.OpenWeb())
      {
            currentList = currentWeb.Lists.TryGetList["MyList"];
      if(currentList!=null)
      {
                      Console.WriteLine(currentList.Title);
                      Console.ReadKey();
      }
      }
}
So that we can check null value.

Share Point- The trial period for this product has expired


While working on SharePoint 2010,One fine Monday morning i came to office and started my work. I was started browsing my share point dev site, it was shown an error message "The trial period for this product has expired." 




I am very sure that Iam not working on any trail product. Started googling it and found 3 reasons for that error,


  • My SharePoint is trailed one and it was expired.
  • Problem with my Central Administrator Application pool Account
  • Problem with my registry.
There is 0% chances for the first one. If it is, i have only one choice to fix it (get licensed version of share point :))

While checking the second option, Go to inet manager, check the central administration site application pool account. It was running with Network Credentials. Account that are running application pool need to be in the local administrator group. So i just changed the application pool account to Administrator. 


Run--> inetmgr-->Application Pools--> SharePoint Central Administrator--> Advanced Sttings--> Identity (change the account)

Or add the current application pool identity account to local Administrator group.

Run "iisreset"   

Still you have same issue, there might be some share point secure sources not configured correctly . You need to run "SharePoint Configuration wizard" or run 
"psconfig.exe -cmd secureresources" command(c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Bin\psconfig.exe -cmd secureresources)

Thursday, November 22, 2012

add custom link and custom group in sharepoint site settings page using feature

Create a empty sharepoint solution vs2010-> new Project-> Empty Sharepoint 2010 solution Add New Fature Right click on "Feature" Add new feature Add New Item-> select "Empty Element" You'll get Element.xml file in the project Add Following xml to the Elements.xml



<?xml version="1.0" encoding="utf-8"?>


<Elements xmlns="http://schemas.microsoft.com/sharepoint/">


  <CustomActionGroup


    Id="CustomFeatureGroup"


    Title ="PolicySignOff"


    Sequence="1000" Location="Microsoft.SharePoint.SiteSettings"


    ImageUrl="../_layouts/dhq_icon.png">


  </CustomActionGroup>


  <CustomAction


     Id="CustomFeatureLink"


     GroupId="CustomFeatureGroup"


     Location="Microsoft.SharePoint.SiteSettings"


     Sequence="1000"


     Title="PolicySignOff Settings">


    <UrlAction


          Url="/_layouts/settings.aspx"/>


  </CustomAction>


</Elements>


here "Custom Action Group" tag will add new group in the site settings page. "Custom Action" will add new custom link. We need to mention the custom Group and Location in the tag. For default sharepoint Group id's and link's check here. Add following xml in feature.xml file



<feature activateondefault="TRUE" alwaysforceinstall="TRUE" autoactivateincentraladmin="FALSE" description="Will create a link for PolicySignOff Settings" hidden="FALSE" id="{GUID}" imageurl="dhq_icon.png" scope="Site" title="{Title}" xmlns="http://schemas.microsoft.com/sharepoint/">


  <elementmanifests>


    <elementmanifest location="{Elemnts.xml location}">


    </elementmanifest>


  </elementmanifests>


</feature>

You need to activate the feature. You'll get custom group and custom links in site settings page.

Wednesday, November 21, 2012

a web part of web form control on this page cannot be displayed or imported sharepoint 2010 error in Sharepoint webpart

"a web part of web form control on this page cannot be displayed or imported sharepoint 2010", It's a generic error in sharepoint 2010 that in the message it self they are explaining the problem that it was not registered as safe. I was googled for some time to get the exact details and resolution for that error i have found an excellent article here 

http://www.bluedoglimited.com/SharePointThoughts/Lists/Posts/Post.aspx?ID=189

It will applicable for not only sharepoint 2010, also reflects Sharepoint all versions to explain the error details.

Thursday, November 8, 2012

basic site template Id's in Sharepoint 2010

One of Client required that they need to create a site when ever a new item in the list. We can go with list event handler for that and they need some blank meeting workspace site template to be used when a new item created. We all know the team site template id is 'STS#0'. But what is the id for the blank meeting workspace. After googling a little bit i got the folloewing link with al site id's
  https://www.nothingbutsharepoint.com/sites/devwiki/SP2010Dev/Pages/Site%20Templates%20in%20SharePoint%202010.aspx