Pages

Search This Blog

Saturday, September 21, 2013

Microsoft SharePoint Server 2013 Licensing and pricing


Now again Microsoft has changed the paradigm of licensing with SharePoint 2013

Lets have a look, how it works now. This content has been taken from a Microsoft document which might change in future,  Please contact Microsoft licensing team before taking any final decisions on licensing part.

Concepts that Provide a Framework for SharePoint Server Licensing


Internal Users: Users who are the licensee’s or its affiliates’ employees and on-site agents and contractors.
External Users: Users who are not the licensee’s or its affiliates’ employees or on-site agents or contractors.
Intranet: Website hosting content, information, or software that is accessible inside the firewall to internal users only.
Extranet: Website hosting content, information, or software that is accessible inside the firewall to internal users and named external users only.
Internet: Website hosting content, information, or software that is publicly accessible to all users (internal and external).

sharepoint-2013-intranet-extranet-internet-licence

Microsoft SharePoint Server 2013 Licensing

Microsoft licenses SharePoint Server 2013 under the Server/Client Access License (CAL) licensing model. The Server/CAL licensing model requires both a server license for each copy of the server software a customer installs and uses and CALs for the users (or devices) that access that software. CAL requirements vary based on user status, and CALs are generally required for internal users to access all SharePoint Server software. An exception to this is internal user access to Internet websites (public-facing websites such as e-commerce sites). In this case, the SharePoint CAL requirement is waived. In contrast to the general requirement for CALs for internal user access, CALs are not required for external users to access SharePoint Server. In other words, the server license provides access rights for external users. The same criteria can be used for determining when CALs are required for SharePoint base CALs and Enterprise CALs; however, SharePoint Enterprise CALs are required only if functionality corresponding to the SharePoint Enterprise CAL is accessed. For more information about which SharePoint features are part of the base product and which features are considered additional functionality requiring additive CALs, refer to http://technet.microsoft.com/en-us/library/jj819267.aspx

Or


The following decision tree illustrates whether a user needs a SharePoint CAL or not. “Restricted” refers to content stored inside the firewall for internal access and possibly limited, identified external user access. “Public/Internet” refers to content stored outside the firewall for broad, unrestricted access.

sharepoint-2013-decision-tree

User Scenarios

This document also illustrates common deployment scenarios to further explain the licensing requirements of SharePoint Server 2013. Users can license these same deployment scenarios under device-based CALs.

Scenario A: Intranet

Description: Internal users accessing content, information, or applications inside the firewall through a local area network (LAN) or the Internet. No other users have access.
Example: A professional sports team sets up an intranet site that the manager, coach, and players access. It is also used for support staff such as the physiotherapist who is an on-site contractor rather than an employee, and for CAL requirements, an internal user. A news reporter trying to access the SharePoint Server site is denied access.
Licensing:
Server: One SharePoint Server 2013 license per running instance of the software.
Internal Users: One CAL/user.

sharepoint-2013-intranet-scenario


In Figure 3, the internal users (the team’s managers, coach, players, and on-site therapist) each must be assigned a CAL. This requirement does not change if the same users are accessing the intranet site remotely from the team’s offices. Given that this is an intranet site, no external user access is permitted.

Scenario B: Extranet

Description: An organization extends access to otherwise restricted content inside the firewall to a limited number of identifiable external users.
Example: The Elm University publishes research papers that are available to specific educators from other universities (external users). This situation is an intranet plus extranet scenario.
Licensing:
Server: One SharePoint Server 2013 license per running instance of the software.
Internal Users: One CAL/user.
External Users: SharePoint CALS are not required; the server license permits external user access.

sharepoint-2013-extranet-scenario

In Figure 4, the internal users (the school’s faculty and staff) each must be assigned a SharePoint CAL. This requirement does not change if the same users access the site remotely while they are off-campus. The identifiable external users (educators from other universities) who are permitted to access otherwise restricted content inside the firewall do not require SharePoint CALs, because external user access is permitted under the server license. No other users are permitted to access the site.

Scenario C: Internet

Description: Internal users make content, information, and applications publicly available to users via the Internet (for example, on a public-facing company website). A mix of internal and external users anonymously accesses the site, including employees. No SharePoint CALs are required. External user access is permitted under the server license, and SharePoint CAL requirements for internal users are waived for access to content, information, and applications made publicly available via the Internet.
Licensing:
Server: One SharePoint Server 2013 license per running instance of the software.
Internal Users: CALs are not required.
External Users: CALs are not required.

sharepoint-2013-internet-scenario.png

In Figure 5, access is unrestricted. The only license required is the server license. SharePoint CALs are not required to access content, information, and applications made publicly available to users via the Internet (that is, not restricted to intranet or extranet scenarios). The same licensing applies for an e-commerce site where access is not strictly anonymous. Again, SharePoint CALs are not required to access content, information, and applications made publicly available to users via the Internet.

Simplifying Licensing

SharePoint Server 2013 simplifies SharePoint access and use. This is because SharePoint Server 2013 collapses internal and external use under a single licensing offering/model. Customers no longer need to look to SharePoint for Internet Sites to license anonymous access. Additionally, SharePoint Server 2013 integrates functionality that was previously available separately under FAST Search Server for SharePoint.

Monday, June 17, 2013

Send Large data with SharePoint Webservice


When ever you need to send lots of lots of data in WCF REST service using custom SharePoint MultipleBaseAddressWebServiceHostFactory then you will encounter following error 

(400) HTTP Bad Request


When you look into service trace you will find the actual root cause of this issue is that the data sent is not supported by default and its failing internally in deserialize process

<ExceptionType>System.ServiceModel.Dispatcher.NetDispatcherFaultException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:ADXML. The InnerException message was 'There was an error deserializing the object of type System.String. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.'.  Please see InnerException for more details.</Message>
<StackTrace>

Now if you try to override the settings in web.config then web service will complain about multiple settings for the same end point because factory it self creates the dynamic end points so web.service changes can't be used unless you remove the factory class and do it conventional way.

So what is the solution :

Its easy that we need to just extend two classes

Microsoft.SharePoint.Client.Services.MultipleBaseAddressWebServiceHostFactory 
Microsoft.SharePoint.Client.Services.MultipleBaseAddressWebServiceHost


 public class CustomMultipleBaseAddressWebServiceHostFactory : Microsoft.SharePoint.Client.Services.MultipleBaseAddressWebServiceHostFactory
    {
        protected override System.ServiceModel.ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
        {
            return new CustomMultipleBaseServiceHost(serviceType, baseAddresses);
        }

      
    }

    public class CustomMultipleBaseServiceHost : Microsoft.SharePoint.Client.Services.MultipleBaseAddressWebServiceHost
    {
        public CustomMultipleBaseServiceHost(Type serviceType, params Uri[] baseAddresses)
            : base(serviceType, baseAddresses)
        {
        }


        protected override void OnOpening()
        {
            base.OnOpening();

            System.Diagnostics.Debug.Assert(false);

            foreach (ServiceEndpoint endpoint in this.Description.Endpoints)
            {
                Binding binding = endpoint.Binding;
                if (binding is WebHttpBinding)
                {
                    var web = binding as WebHttpBinding;
                    web.MaxBufferSize = Int32.MaxValue;
                    web.MaxReceivedMessageSize = Int32.MaxValue;
                }
                var myReaderQuotas = new XmlDictionaryReaderQuotas();
                myReaderQuotas.MaxStringContentLength = Int32.MaxValue;
                binding.GetType().GetProperty("ReaderQuotas").SetValue(binding, myReaderQuotas, null);
            }
        }
    }

Now if you see we can make the changes to any parameters like maxBufferSize or MaxrecievedMessageSize at the time of opening of channel.

Now instead of using default Microsoft class in the svc file we will use our custom dll reference. Deploy your solution. DO an IISRESET and you will be able to transmit huge data now :)

<%@ ServiceHost Language="C#" 
Service="Custom.Assembly.Classname,$SharePoint.Project.AssemblyFullName$" 
CodeBehind="CustomClass.cs"
Factory="CustomMultipleBaseAddressWebServiceHostFactory, $SharePoint.Project.AssemblyFullName$"  %> 

Monday, May 6, 2013

Parameter count mismatch

If you are working with BCS to pull data for search service application or FAST Search then you might have encountered this error when ever you try to update a dll where you have added or removed parameters for either paging or some custom logic.

"Parameter Count Mismatch"

Here are the steps that you should use to resolve this issue :

1. Upload your dll in GAC
2. Run following commands in powershell



$url = "http://gdc-encore"
$assemblyPath = "Assembly path"
$lobSystem = "Lob system name"
Write-Host "Adding assembly to LOBSystem"
$serviceContext = Get-SPServiceContext $url
$lobSystem = Get-SPBusinessDataCatalogMetadataObject -ServiceContext $serviceContext -BdcObjectType lobsystem -Name $lobSystem
Import-SPBusinessDataCatalogDotNetAssembly -LobSystem $lobSystem -Path $assemblyPath



3. Reset search service from the services named "SharePoint Server Search 14" which is running mssdmn behind the scenes and caches the dll which causes the mismatch in assembly reference.





Saturday, March 23, 2013

Create Managed Path via PowerShell



#-----Function to Load SharePoint PowerShell Environment----#
function LoadSharePointPowerShellEnvironment
{
 write-host "Setting up PowerShell environment for SharePoint..." -foregroundcolor Yellow
 Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue
 write-host "SharePoint PowerShell Snapin loaded." -foregroundcolor Green
}



function Create-SPManagedPath
{
  param ($webApplicationUrl, $managedPathName)
  $managedPath = Get-SPManagedPath -WebApplication $webApplicationUrl -Identity $managedPathName -ErrorAction SilentlyContinue
  if ($managedPath -ne $null)
  {
  Write-Host "Managed path $managedPathName already exists."
  return
  }

  Write-Host "Creating managed path $managedPathName ..."
New-SPManagedPath –RelativeURL $managedPathName -WebApplication $webApplicationUrl
  Write-Host "Managed path $managedPathName created sucessfully" -foregroundcolor Green
}


LoadSharePointPowerShellEnvironment
Create-SPManagedPath "http://mywebappurl" "logical"

Tuesday, March 19, 2013

Convert SharePoint 2010 solution to SharePoint 2013 in Visual Studio


Recently I tried to convert a SharePoint solution in visual studio 2010 to Visual Studio 2012, but it gave me errors like:

"The primary reference "Microsoft.SharePoint" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework."

You can refer to below steps if you want to convert your SharePoint 2010 solution (created with visual studio 2008 or 2010) to visual studio 2012 for SharePoint 2013: 
  • Open your visual studio .csproj file in notepad or visual studio and change the value of  tag "TargetFrameworkVersion" to 4.5

  • Add a new tag just below the one you modified in above step as:
        <TargetOfficeVersion>15.0</TargetOfficeVersion>

This way your modified csproj file will have attributes as shown below:


  • You will also need to change the SharePoint Product version property of your  Package file from 14.0 to 15.0 as shown below. 
  •  In your aspx pages and code files, where you are referencing any image from Layouts folder, you need to append "/15" as:
           /_Layouts/15/<your image path>

Friday, February 1, 2013

Download all solutions wsp from sharepoint 2010 central admin using powershell

[void][reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint")
[void][reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration")
[void][reflection.assembly]::LoadWithPartialName("System")
[void][reflection.assembly]::LoadWithPartialName("System.Collections")
[Microsoft.SharePoint.Administration.SPFarm]$farm = [Microsoft.SharePoint.Administration.SPFarm]::get_Local()

Write-Host -foregroundcolor White "Starting solutions download process..."

foreach ($solution in $farm.Solutions)
{
Write-Host -foregroundcolor White ""
Write-Host -foregroundcolor Yellow "Downloading solution $solution..."
$file = $solution.SolutionFile
$solutionName = $solution.name
$file.SaveAs("c:\solutions\$solutionName")
Write-Host -foregroundcolor Green "Solution $solutionName downloaded successfully."
}

Write-Host Write-Host -foregroundcolor Green "All solutions downloaded in c:\solutions folder"
Read-Host 'Done...'

Friday, January 4, 2013

Reset IIS on all the servers in FARM



Save the commands in a power shell script file and execute it in any of the servers present in FARM.



Write-Host -foregroundcolor Green "Restarting IIS on all the servers in FARM..."

[void][reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint")
[void][reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration")
[void][reflection.assembly]::LoadWithPartialName("System")
[void][reflection.assembly]::LoadWithPartialName("System.Collections")
# Get the local farm instance

[Microsoft.SharePoint.Administration.SPFarm]$farm = [Microsoft.SharePoint.Administration.SPFarm]::get_Local()

#Step through each server in the array and perform an IISRESET
#Also show IIS service status after the reset has completed

foreach ($server in $farm.Servers)
{
    if($server.Role -ne "Invalid")
    {
       Write-Host -foregroundcolor White ""
       Write-Host -foregroundcolor Yellow "Restarting IIS on server $server..."
       IISRESET $server.Name /noforce
       Write-Host -foregroundcolor Yellow "IIS status for server $server"
       IISRESET $server.Name /status
    }
}
Write-Host Write-Host -foregroundcolor Green IIS has been restarted on all servers
Read-Host 'Done...'



Tuesday, October 23, 2012

Attach Disposition Workflow on a content type using Powershell

Hi Friends,

Many times we are needed to attach a "Disposition Workflow" with a Content Type in SharePoint 2010. This is pretty easy to accoplish. Please find the PowerShell to do this.

# Method Calling
AddWorkflowToContentType $site $ContentTypeName "Disposition Approval" "WFA" $TaskListName

#Method Definition
function AddWorkflowToContentType($site, $ctName, $WfName, $WfAssociationName, $TaxTaskList)
   {
    [void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SharePoint')
    [void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.Office.Policy')

    [Guid]$wfTemplateId = New-Object Guid
    $web = $site.RootWeb
       $ct = $web.ContentTypes[$ctName]
       $culture = New-Object System.Globalization.CultureInfo("en-US")
       $template = $site.RootWeb.WorkflowTemplates.GetTemplateByName($WfName, $culture)
   
       if($template -ne $null)
       {                       
      $tasklist = $TaxTaskList
                     $historylist = "Workflow History"
                    
                        # Checking For WorkFlow History List; If not exists then create it
                        if(!$web.Lists[$historylist])
                        {
                            $web.Lists.Add($historylist, "A system library used to store workflow history information that is created in this site.  It is created by the Publishing feature.",
                            "WorkflowHistory", "00BFEA71-4EA5-48D4-A4AD-305CF7030140", 140, "100")
                           
       if (!$web.Features["00BFEA71-4EA5-48D4-A4AD-305CF7030140"]) {
                                Enable-SPFeature -Identity WorkflowHistoryList -Url $web.Url
                            }
    
                            $wfHistory = $web.Lists[$historylist]
                            $wfHistory.Hidden = $true
                            $wfHistory.Update()
                        }

                        # Checking For WorkFlow Task List; If not exists then create it
                        if(!$web.Lists[$tasklist])
                        {
                            $web.Lists.Add($tasklist, "This system library was created by the Publishing feature to store workflow tasks that are created in this site.", "WorkflowTasks", "00BFEA71-A83E-497E-9BA0-7A5C597D0107", 107, "100")
                        }
   
                        # Creating Workflow Association with Content Type
                        $association = [Microsoft.SharePoint.Workflow.SPWorkflowAssociation]::CreateSiteContentTypeAssociation($template, $WfAssociationName, $web.Lists[$tasklist], $web.Lists[$historylist])
                       
      $association.AllowManual = $false
                        #$association.AutoStartCreate = $true
                        $ct.AddWorkflowAssociation($association)
                        $ct.UpdateWorkflowAssociationsOnChildren($true, $true, $true, $false)
                        $association.Enabled=$true
                        $ct.Update()
                        $web.Update()
                        #$ct.WorkflowAssociations[0]           
       }
       else
       {
        Write-Error "Workflow Template not found"
                    Add-Content $logFileName "Workflow Template not found."
       }
   }

Happy Coding!!!

Prabhat

Friday, July 20, 2012

Requested registry access is not allowed


If you are trying to register a new manage account in SharePoint 2013 and getting error
Application error when access /_admin/registeraccount.aspx, Error=Requested registry access is not allowed.  
 at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)    
 at Microsoft.SharePoint.Administration.SPCredentialManager.GetMasterKey(SPFarm farm)    
 at Microsoft.SharePoint.Administration.SPCredentialManager.GetFarmEncryptionKey(SPFarm farm)    
 at Microsoft.SharePoint.Administration.SPCredentialManager.EncryptWithMasterKey(SecureString sstrPassphrase)    
 at Microsoft.SharePoint.Administration.SPEncryptedString.SetSecureStringValue(SecureString sstrValue)    
 at Microsoft.SharePoint.Administration.SPManagedAccount.Update()    
 at Microsoft.SharePoint.WebControls.RegisterAccountControl.BtnSubmit_Click(Object sender, EventArgs args)    
 at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)    
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
 at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
 at System.Web.UI.Page.ProcessRequest()    
 at System.Web.UI.Page.ProcessRequest(HttpContext context)    
 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
 at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Please make sure that apppool user of the central administrator have full access on the following location in registry.
HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\Secure\FarmAdmin

Thursday, July 19, 2012

Configure SharePoint 2013 Project Template in Visual Studio 2012 RC

If you have installed SharePoint 2013 and Visual Studio 2012 RC, but can not see the SharePoint 2013 project template in visual studio, please refer the below steps to setup it.


  •  Select the "Microsoft Office Developer Tools for Visual Studio 2012 RC" from the search result.
  • Add and install the selected component. During installation, it will install other supporting components also.

  • After installation, Install SharePoint Server 2013 Client Components SDK from the following location.

  • You are done now and SharePoint 2013 project template should be available in the visual studio 2012. 




Wednesday, July 18, 2012

Sharepoint 2013 Beta released

Microsoft has officially released the beta version of its Sharepoint Foundation 2013 Preview and Sharepoint Designer 2013. You can follow below links to download the beta versions:

You can also navigate to the below link for details on SharePoint 2013

http://msdn.microsoft.com/en-us/library/sharepoint/jj162979(v=office.15)

Monday, June 11, 2012

SharePoint 15


Microsoft is planning to release the beta version of its new SharePoint avtaar aka SharePoint 15 by this summer, however the actual product may be launched later this year or starting 2013. I have been searching for the new enhancements and new features that Microsoft is planning for SharePoint 15. Below are some key points that I gathered while searching for new features of SharePoint 15.

  • Include an overhauled Client Object Model (COM), "making it easier for UI designers and front-end developers to build compelling visual interfaces."
  • Support a new app marketplace that will create an ecosystem for multitenant apps.
  • Feature a version for education and training called SharePoint Education.
  • Enable workflow looping in SharePoint Designer, eliminating the need for the Visual Studio development environment for that function.
  • Provide authentication via OAuth 2.0, an open standard that provides cross-platform authentication.
  • SharePoint 15 and Exchange Server 15 are both getting additional built-in information-rights-management (IRM) document-protection functionality as part of the base products.
  • Project Online: New Project site to manage lightweight projects.
  • Visio cloud service component.
  • Offer added information rights management in SharePoint Foundation.
  • Support for viewing business intelligence content on Apple iPad devices.
  • SharePoint 2013 Technical Preview Software Development Kit (SDK) is launched and can be downloaded at: http://social.technet.microsoft.com/wiki/contents/articles/8564.sharepoint-2013-technical-preview-interoperability-api-documentation.aspx
  • New SharePoint Apps Marketplace.
    Namespace:
    using  Microsoft.SharePoint.AppManagement
     
  • Support new Database provider. You can attach Database like MSSQL and any other using namespace:
Microsoft.SharePoint.Administration.DatabaseProvider
 
  • Authentication with a service that supports OAuth 2.0 bearer token authentication using namespace:
Microsoft.SharePoint.IdentityModel.OAuth2
 

Sunday, April 22, 2012

SharePoint List Bulk Delete

Hi Friends,

I came through some requirement where I need to delete number of rows on the basis of some condition. Here we have choice of iterating all the list items and match the required condition if matched delete that list record. This is fine when we say its meeting the requirement. But when we look into its performance its not really a good solution. So here we have another very efficient solution of using ProcessBatchData of SPWeb. This batch technique is 10 times faster than list.Delete(i) technique and it minimizes the round trips to DB. Please find a very simple implementation of this you can alter this as per your requirement.


private void button1_Click(object sender, EventArgs e)
        {
            String strSourceList = "Bulk Delete List";//textBox2.Text.Trim();
            String strSite = "http://abcSite:9000/sites/uk/";//textBox1.Text.Trim();
            String strIds = String.Empty;
            try
            {
                if (!String.IsNullOrEmpty(strSite))
                {
                    if (!String.IsNullOrEmpty(strSourceList))
                    {
                        try
                        {
                            SPSite sourceSite = null;
                            try
                            {
                                sourceSite = new SPSite(strSite);
                            }
                            catch { }

                            if (sourceSite != null)
                            {
                                SPWeb sourceWeb = sourceSite.RootWeb;
                                if (sourceWeb != null)
                                {
                                    sourceWeb.AllowUnsafeUpdates = true;

                                    SPList sourceList = sourceWeb.Lists[strSourceList];
                                    StringBuilder sbDelete = new StringBuilder();
                                    sbDelete.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?><Batch>");

                                    if (sourceList != null)
                                    {
                                        string command = "<Method>" +
                                                         "<SetList Scope=\"Request\">" + sourceList.ID + "</SetList>" +
                                                         "<SetVar Name=\"ID\">{0}</SetVar>" +
                                                         "<SetVar Name=\"Cmd\">Delete</SetVar>" +
                                                         "</Method>";

                                        foreach (SPListItem objListItem in sourceList.Items)
                                        {
                                            sbDelete.Append(string.Format(command, objListItem.ID.ToString()));
                                        }
                                        sbDelete.Append("</Batch>");

                                        string retVal = sourceWeb.ProcessBatchData(sbDelete.ToString());

                                    }
                                }
                            }
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }

Thanks
Prabhat