Friday, 1 August 2014

Enable Anonymous Access in SharePoint 2010

Here are 8 simple steps on how to set up anonymous access in MS SharePoint 2010.  It is not much different then SharePoint 2007 set up, the only difference is the GUI or the Ribbon.

1. Starting in Central Administration, under Application Management, click on the Manage web applications.
 

2. Make sure you select the site you want to enable anonymous access and click on the Authentication Providers icon.




3. On the Authentication Providers pop-up window click on the Default zone.



4. Under Edit Authentication, check Enable anonymous access and click Save.


5. Going back to Web Application Management click on the Anonymous Policy icon.


6. Under Anonymous Access Restrictions select your Zone and set the Permissions to None – No policy and click Save.


7. Now, web application will allow anonymous access to be set. So, navigate to your top level site collection for the web application. Click the Site Actions > Site Settings. Under Users and Permissions click Site permissions.

8. Under Permission Tools, click Anonymous Access icon and set the permissions to Entire Web site and click OK.




That’s all, folks! If you followed these steps properly you should have now Anonymous Access enabled.

How to Download All Your SSRS Report Definitions (RDL files) Using PowerShell

Here’s a short PowerShell script that :
1. Connects to your report server
2. Creates the same folder structure you have in your Report Server
3. Download all the SSRS Report Definition (RDL) files into their respective folders

In addition to backing up your Source Project, your ReportServer database, or good old RSScripter (see http://sqlserver-indo.org/blogs/mca/archive/2009/03/08/extract-and-transfer-rdl-files-from-ssrs.aspx) this is just another way you can “backup” or archive your reports.


#note this is tested on PowerShell v2 and SSRS 2008 R2
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Xml.XmlDocument");
[void][System.Reflection.Assembly]::LoadWithPartialName("System.IO");
 
$ReportServerUri = "http://yourreportserver/ReportServer/ReportService2005.asmx";
$Proxy = New-WebServiceProxy -Uri $ReportServerUri -Namespace SSRS.ReportingService2005 -UseDefaultCredential ;
 
#check out all members of $Proxy
#$Proxy | Get-Member
#http://msdn.microsoft.com/en-us/library/aa225878(v=SQL.80).aspx
 
#second parameter means recursive
$items = $Proxy.ListChildren("/", $true) | `
         select Type, Path, ID, Name | `
         Where-Object {$_.type -eq "Report"};
 
#create a new folder where we will save the files
#PowerShell datetime format codes http://technet.microsoft.com/en-us/library/ee692801.aspx
 
#create a timestamped folder, format similar to 2011-Mar-28-0850PM
$folderName = Get-Date -format "yyyy-MMM-dd-hhmmtt";
$fullFolderName = "C:\Temp\" + $folderName;
[System.IO.Directory]::CreateDirectory($fullFolderName) | out-null
 
foreach($item in $items)
{
    #need to figure out if it has a folder name
    $subfolderName = split-path $item.Path;
    $reportName = split-path $item.Path -Leaf;
    $fullSubfolderName = $fullFolderName + $subfolderName;
    if(-not(Test-Path $fullSubfolderName))
    {
        #note this will create the full folder hierarchy
        [System.IO.Directory]::CreateDirectory($fullSubfolderName) | out-null
    }
 
    $rdlFile = New-Object System.Xml.XmlDocument;
    [byte[]] $reportDefinition = $null;
    $reportDefinition = $Proxy.GetReportDefinition($item.Path);
 
    #note here we're forcing the actual definition to be 
    #stored as a byte array
    #if you take out the @() from the MemoryStream constructor, you'll 
    #get an error
    [System.IO.MemoryStream] $memStream = New-Object System.IO.MemoryStream(@(,$reportDefinition));
    $rdlFile.Load($memStream);
 
    $fullReportFileName = $fullSubfolderName + "\" + $item.Name +  ".rdl";
    #Write-Host $fullReportFileName;
    $rdlFile.Save( $fullReportFileName);

Enterprise Wiki template is unavailable when you create a new SharePoint subsite

You have a Microsoft SharePoint site collection. When you try to create a new subsite, you notice that the Enterprise Wiki template is not available as an option.

To resolve this issue, turn on the Publishing feature at the site collection level. To do this, follow these steps:
  1. On the Site Actions or Settings menu (depending on your version of SharePoint), point to Site Settings, and then click Modify All Site Settings.

    Note If you do not see additional items when you point to Site Settings, click Site Settings.
  2. If you are not at the root of your site, under Site Collection Administration, click Go to top level site settings.
  3. On the Site Settings page, under Site Collection Administration, click Site collection features.
  4. On the Site Collection Features page, next to Office SharePoint Server Publishing Infrastructure or SharePoint Server Publishing Infrastructure (depending on your version of SharePoint), click Activate.

sps3:// Search Crawl Access is denied error

If you are looking at SharePoint Search Crawl logs, and find a top level Error, in details you'd find:

Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled. ( HttpStatusCode Unauthorized The request failed with HTTP status 401: Unauthorized. )

You need to go to the site settings of the site giving error and do the following:

In Site Administration section of Site Settings, find Search and offline availability click that link. Make sure the Allow this site to appear in search results is set to Yes.


Thursday, 17 July 2014

Verify that OAuth is configured correctly for the Machine Translation Service application proxy in SharePoint 2013

So I have just installed SharePoint 2013 SP1 and the Health Analyzer showed up this error.

Resolution: Ensure that every Web application with a Machine Translation Service application proxy has a connection to a User Profile service application and an App Management service application, and is in claims-based authentication mode.


  • Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
  • On the Central Administration website, click Application Management.
  • On the Application Management page, in the Service Applications section, click Configure service application associations.
  • In the Application Proxy Group column, click the proxy group for the Web application or service application that you want to configure. Usually it is the default Application Proxy Group.
  • Select the User Profile Service Application Proxy check box and the App Management Service Application Proxy check box.
  • Go back to the Central Administration Home page. In the Application Management section, click Manage web applications.
  • Click the Web application you want to configure, and then click the Authentication Providers button on the ribbon.
  • Ensure that the Membership Provider Name for the Default zone is Claims Based Authentication. If not, you have to migrate the Web applications from classic mode to claims-based authentication. For more information, see Migrate from classic-mode to claims-based authentication in SharePoint 2013.

The Machine Translation Service is not running when it should be running (SharePoint 2013)

So I just installed SharePoint 2013 SP1 and got this error, here is how to solve this.


  • Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
  • On the Central Administration website, click Monitoring.
  • On the Job Definitions page, in the list of timer jobs, click Machine Translation Service Timer Job.
  • On the Edit Timer Job page, in the Recurring Schedule section, specify when you want the timer job to run, and then click Enable.

Tuesday, 1 July 2014

Grant local admin rights on Windows Server 2012

Running your SharePoint development environment as a domain user is pretty much a requirement. But running a SharePoint development environment without being local administrator is also a pain.

To grant your domain user the appropriate rights for being a local admin and being able to run everything as administrator without specifically asking to “Run as administrator” you have to do the following.

Add domain account to the local administrators group with the following command line (must be run as a local admin): net local group administrators /add domain\user

Run gpedit.msc and go to Windows Settings > Security Settings > Security Options and set the User Account Control policies as show on the image.



On earlier versions of windows you could go to the control panel and the users account and modify the UAC settings from there, which would effectively make you run everything as administrator without the need to use run as administrator, but this doesn't work on windows 8 or windows server 2012, not that option just removes the prompt of whether or not you are sure you want to run as an administrator.