Friday, February 15, 2013

Ack what happened?? Cannot add permissions



Sorry its been so long folks! I really have a lot to publish, just this thing called work gets in the way....

OK, you have just applied a hotfix, a service pack or did a backup and while you can get to everything just fine, there are a few administrative duties you cannot complete, namely adding new user permissions. You can get to the permissions area, you can browse your address book and enter people but you cannot click OK..check your site lock


Stsadm to the rescue again!


stsadm -o getsitelock -url http://sharepointurl


If it comes back locked...unlock it :)


stsadm -o setsitelock -url http://sharepoint -lock none


Monday, October 31, 2011

Mobile view SharePoint 2010

By default "Mobile View" is turned ON for SharePoint 2010 sites. Mobile view works great for collaboration and intranet sites.  However if your company public website is on SP2010 then you want the pretty designs and colors to show.   

So..... how do we turn this off?  There is a "compat.browser" file in the root of your IIS site that needs modified.

Default path is "c:\inetpub\wwwroot\wss\VirtualDirectories\SharePoint80\App_Browsers\compat.browse"
You will see A TON of browsers in there.  The quickest is to change the most common such as iPhone or Android.  Shown below is an excerpt for Android

< !-- Android Safari Browser -- >
    < !-- sample UA "Mozilla/5.0(Linux; U; Android 1.5; zh-tw; HTC Magic Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1" -- >
    < browser id="AndroidSafari" parentID="Safari2" >
        < identification  >
            < userAgent match="Android" / >
            < userAgent match="Mobile" / >
        < /identification >
        < capabilities >
            < capability name="isMobileDevice"                    value="true" / >
            < capability name="optimumPageWeight"                 value="1500"  / >

To turn OFF the Mobile Views and display the entire website change the "isMobileDevice" value from true to FALSE and save the file.  To get all the browsers start at the top and do a find for isMobileDevice moving through the entire file replacing true with false.

Thursday, June 2, 2011

Moss ma not found

Simple quick and dirty...
If you get the error

Moss ma not found


when setting up user profile sync in sp2010 Start or Restart your 2 Forefront Identity Manager services in Windows Services......

Friday, May 27, 2011

Setting Failover Partners for Sharepoint 2010

So one of the best things about Sharepoint 2010 over MOSS is that it allows for you to configure failover partners vs having to do a workaround held together with shoelaces and gum.  Many can be set via Central Administration, as seen below for many Application Services, the Content DB's, Config DB's etc.
However there are many to which you cannot and requires powershell.  If you're like me, and you have never used powershell before, this is a little intimidating at first "having" to use it.  I knew stsadm inside and out but never had a need to use PowerShell... well I've come to love this little gem ;)  It's handy and simple, so don't fear.

I've seen several variations of the commands but below is the only tried and true way I was able to get ALL the db's set with failovers.  I have found some commands work for some and not others, some can be set in CA  etc.  Since the following works for ALL db's I try to simplify my life and use only that one :)

First Open SharePoint Management Shell.  ***Note you must be logged into PS as the Farm Account to set the failovers, a farm admin does not have sufficient rights to do this.***
To find out your databases on the farm use (this will also give you the GUID to the DB that you need later)
get-spdatabase
to see which are configured for failover use
get-spdatabase | select name, failoverserver 

$db = get-spdatabase 9835a946-272f-4e9d-b85b-0dcd79297e21 <-- this is your GUID from get-spdatabase)
$db <-- this is to verify you have the right DB
$db.AddFailoverServiceInstance("SQL02") <-- insert your failover SQL server in the ("")
$db.Update()



I then usually run get-spdatabase | select name, failoverserver  just to verify it has been set.

TechNet gives you a good listing on which DB's can be mirrored and failover and which cannot found here 
http://technet.microsoft.com/en-us/library/cc678868.aspx



Friday, November 12, 2010

Sharepoint 2010 Shared Services Trusts

First what is Application Services sharing... simply put it allows you to configure a service application such Managed Metadata in 1 farm say a Staging Farm or Authoring Farm and use the same database/configuration etc in a Production environment.... This cuts down on maintenance, configuration tasks, and the daunting portions of rentering mass custom settings or in this case keywords etc.

Ok...there's very little out there on doing this and while TechNet does a great job detailing creating the trust it leaves out an extremely important part that the trusts will not work without....  You will recieve this error when trying to consume a published resource

"Unable to connect to the specified address. Verify the URL you entered and contact the service administrator for more details.”

Luckily I ran across this single post ( http://www.harbar.net/archive/2010/05/03/service-application-federation-with-sharepoint-2010.aspx )

So I've compiled the 2 sets of information to get you to where you need to be in setting up the trusts to use shared service applications between farms.  FYI - this uses PowerShell and cannot be done via GUI until you reach the establishing trust section


Create Trust between farms

To export the root certificate from the consuming farm
  1. On the Start menu, click Administrative Tools.
  2. Click SharePoint 2010 Management Shell.
  3. At the Windows PowerShell command prompt, type each of the following commands:
$rootCert = (Get-SPCertificateAuthority).RootCertificate
$rootCert.Export("Cert") | Set-Content e:\Prod.cer -Encoding byte
To export the STS certificate from the consuming farm
  1. At the Windows PowerShell command prompt, type the following commands:
$stsCert = (Get-SPSecurityTokenServiceConfig).LocalLoginProvider.SigningCertificate
$stsCert.Export("Cert") | Set-Content E:\ProSTS.cer -Encoding byte
To export the root certificate from the publishing farm
  1. On the Start menu, click Administrative Tools.
  2. Click SharePoint 2010 Management Shell.
  3. At the Windows PowerShell command prompt, type the following commands:
$rootCert = (Get-SPCertificateAuthority).RootCertificate
$rootCert.Export("Cert") | Set-Content E:\Authoring.cer -Encoding byte
To copy the certificates
  1. Copy the root certificate and the STS certificate from the server in the consuming farm to the server in the publishing farm.
  2. Copy the root certificate from the server in the publishing farm to a server in the consuming farm.
To import the root certificate and create a trusted root authority on the consuming farm
  1. At the Windows PowerShell command prompt on a server in the consuming farm, type the following commands:
$trustCert = Get-PfxCertificate
New-SPTrustedRootAuthority Authoring -Certificate $trustCert

To establish trust by using Central Administration
  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.
  2. On the SharePoint Central Administration Web site, click Security.
  3. On the Security page, in the General Security section, click Manage trust.
  4. On the Trust Relationship page, on the ribbon, click New.
  5. On the Establish Trust Relationship page:
    1. Supply a name that describes the purpose of the trust relationship.
    2. Browse to and select the Root Authority Certificate for the trust relationship. This must be the Root Authority Certificate that was exported from the other farm by using Windows PowerShell.
    3. If you are performing this task on the publishing farm, select the check box for Provide Trust Relationship. Type in a descriptive name for the token issuer and browse to and select the STS certificate that was copied from the consuming farm.
    4. Click OK.
After a trust relationship is established, you can modify the Token Issuer description or the certificates that are used by clicking the trust, and then clicking Edit. You can delete a trust by clicking it, and then clicking Delete.

At this point TechNet ends...without the next few commands you will not be able to establish connections to the published resource.  Again a great big thanks to Spencer Harbar
for providing this next section.

Add Remote Farm Permissions

To grant the permissions necessary, on the consumer farm, run the following PowerShell:

(Get-SPFarm).Id
Copy the output. On the publishing farm run the following PowerShell – replacing with the guid from above:

$security = Get-SPTopologyServiceApplication | Get-SPServiceApplicationSecurity



$claimProvider = (Get-SPClaimProvider System).ClaimProvider




$principal = New-SPClaimsPrincipal -ClaimType http://schemas.microsoft.com/sharepoint/2009/08/claims/farmid -ClaimProvider $claimProvider -ClaimValue




Grant-SPObjectSecurity -Identity $security -Principal $principal -Rights "Full Control"

Get-SPTopologyServiceApplication | Set-SPServiceApplicationSecurity -ObjectSecurity $security


Once all of these have been completed successfully you should be able to connect to published applications.  I will try to get a quick note up shortly explaining how to publish and connect

Wednesday, October 13, 2010

Missing Sharepoint 2010 Default Templates??

Super frustrated? Only showing 2 site templates? Wiki and Publishing with workflow? Tried turning on every feature possible at every level? Well...you've come to the right spot to end your frustrations....

1. Go to Site Settings
2. Click "Page layouts and site templates" under the Look and Feel section











3. In the top section called "SubSite Templates" you will notice default it is set to subsites can ONLY use the following templates.











4. You can either change radio button to Subsites can use ANY site template or choose certain templates and click add


Tada! You're now in business......

Monday, October 4, 2010

.SWF restrictions 2010/Opening PDF's

Are you unable to add Flash to your Sharepoint 2010 site?  Are you constantly being prompted to download/save a PDF file vs just opening?  Simple solution...

Cause:  Sharepoint 2010 has stronger default restrictions than Moss 2007 and by default does not allow SWF files.

Solution:
1.  Go to Central Administration
2.  Application Management
3.  Highlight the Web Application you are working with.
4.  Click General Settings/General Settings
















5.  Change Browser File Handling from Strict to Permissive






















Refresh and try again.  You should now be able to open PDF's in browser and use SWF files.  If you are still having problems with some libraries this could be due to not inheriting etc and the "Strict" Restriction is not changed.  This can be changed via Powershell script.  Once I validate a script or 2 I will update the post.