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