Monday, August 22, 2011

Force FBA users to download word document instead of having them open in MS Word

FBA users when opening documents get either prompted with login or MS Word opens up the document and it is either blank or just a new document.

Way i found round this problem is to force them to download the document by going to Central Admin \ Select webapplication\ Authentication provider\ Set Enable Client integration to No.



Wednesday, August 17, 2011

Anonymous user gets prompted to view list items even through they have view list item permissions

In a publishing site even if anonymous users have been granted permission on all the level i.e in Central admin, in Site and if permissions are broken then in List\ Libraries but still they get prompted to enter username\ password to view the list\ list items.

To fix this issue deactivate a hidden feature by name ViewFormPagesLockDown, this feature when active denies access to anonymous users to all pages of type "application pages" by prompting authenication.

Below is the command to deactivate it, after deactivating it turn off\ on anonymous authentication on all the 3 level i.e
in CA for the webapplication,
in Site collection and
finally in any lists that you have broken permissions.

stsadm -o deactivatefeature -url http://yourserver -filename ViewFormPagesLockDown\feature.xml

Below is a MS link to configure anonymous access in sharepoint.
http://office.microsoft.com/en-us/sharepoint-server-help/grant-permissions-to-anonymous-users-HA101805390.aspx

Friday, August 5, 2011

Converting a site to a Site collection

Creating a site collection from site











1. Below I am creating a new database, since my site is a publishing site I will be creating a blank publishing site.


create new site in its own DB using the below cmstemplate


a. $w=Get-SPWebApplication("http://shareptapptest:9002")






b. New-SPContentDatabase "WSS_Content_Internet_Hosted_Sites_3" -DatabaseServer "shareptDBtest" -WebApplication $w






c. new site : here I am creating a blank publishing template which cannot be created from UI


New-SPSite http://shareptapptest:9002/hostedsites -OwnerAlias testdomain\testadmin -Name "SITENAME" -Template "cmspublishing#0"










2. Export the site http://shareptapptest/hostedsites/SUBSITE :






stsadm -o export -url http://shareptapptest/hostedsites/SUBSITE -filename "C:\Deployments\Release2-Technical Upgrade\SUBSITE06142011.bak"






3. Makig sure all site collection and sub site features\ spolutions are activated on the new site collection


a. Make sure all solutions are activated for this site collection as well.






b. Or what you can do is also make sure that all the features that are activated on the source are activated on this site collection as well.






4. Import the exported data using the below command.






stsadm -o import -url http://shareptapptest:9002/Hostedsites -filename "C:\Deployments\Release2-Technical Upgrade\SUBSITE06142011.bak"






5. Potential Issues :


a. when i tried to run the website it bombed out becuase i think it could not find the master page.


b. The master gallery exists only on the site collection level so a site might be pointing to the site collection;s master page in which case when it is exported out the master page will not be exported.


c. Also the publishing images library which is “images” is usually in the stie collection so all images pointing to this will not be visible.






6. to copy the MASTER PAGE : Open 2 instances of SPD , 1 for each website, Copy the master pages from SUBSITE using Sharepoint Designer, copy the 2 master pages from the "MAster PAges"










7. This is used to fix the page layout, if you see the layout of the pages in the document library in SP Designer you will see that the page layout is still pointing to the old server;s pagelayout. Below command will fix the page layout


a. install gary extensions using the below commands


i. Download them from the internet, do a search for Gary Lapointe extensions and you will find them.






Add-SPSolution C:\Deployments\Release2-Technical Upgrade\Lapointe.SharePoint2010.Automation.wsp


Install-SPSolution -Identity Lapointe.SharePoint2010.Automation.wsp -GACDeployment






stsadm -o gl-repairsitecollectionimportedfromsubsite -sourceurl http://mossappdev10:9006/hostedsites/chphc -targeturl http://mossappdev10:9005/hostedsites










OR


Of what you can do is that instead of installingand running these commands, in SPD Deattach and Reattach the page layout and if it refers to the pagelayout on the same server then it is fixed.
8. For any images missing fix the hardcoded references to this SITE when it was the subsite.