Saturday, August 4, 2012

Create a public announcement and display to any other sbusite

source from Displaying a SharePoint List from another team site in Sharepoint Foundation 2010
note: SOAP Service is created on each subsite and refer to home site for the list view id.

Create a lookup list from a home site across multiple subsite.

how to allow a list collection to be a lookup to other subsite?
by doing so it eventually reduce the data duplication. For example, if you have a supplier contact, and you want to be a lookup for each subsite.

Create a lookup list from Home site.
1. create the list at your home site.
2. go to Site Actions -> Site Settings.
3. Under Galleries -> Site Columns
4. click on Create
5. give a column name.
6. Click on Lookup(Information already on this site)
7. Under Group section, you use existing group name or create a new group name. E.g: "Home Lookup Group".
8. As usual, create your lookup list refer from list collection and columns.

Setup a lookup list from existing site column.
1. Create a new content in any type or from existing content type.
2. Create lookup column with "Add from existing site columns".
3. Choose from the group you created.
4. click the "Add >" button from "Available site columns" to Columns to add".
5. Click OK to save.

SharePoint Date time format for Web Application Site

Default date time format for each site collection is English(United State). Which means the format is mm/dd/yyyy. To Have your site for different format e,g: dd/mm/yyyy, follow steps bellow:
1. Go to Site Actions -> Site Settings
2. Under Site Administration -> Regional Settings.
3. Change your Locale to English(United Kingdom).
4. Save it.

Open files in application or web browser from SharePoint

Note: This only work with Libraries type. Not List or custom list attachment.

For every document libraries, If you want to have your document being open from native application or web browser, here are the steps:
1. from the Ribbon, go to Libraries -> Libraries Settings.
2. Click on Advanced Settings
3. look for a section call Opening Documents in the Browser.
4. Choose Open in the client application OR Open in the browser.
5. save it.

Also make sure enable Permissive form Browser File Handling under Web Application General Setting from the Sharepoint Admin Central.

Tuesday, June 26, 2012

Configure SPF with RBS(Remote Blob Storage)/Store file externally

Configure your First Web Application for RBS

By Default SharePoint 2010 Foundation/Server store attachment files within the database call Blob type unlike WSS3.0, which it store file external automatically. But Luckly, there are solution from Microsoft that can have the blob type to be a remote blob, means the file can be store external from your physical HDD like WSS3.0.
This article describe by assuming you had all your SP/SPF2010 installed properly or even in a production environment.

bellow are the steps:
This is about how to configure your SPF to store files/Attachment external other than inside Database
1. go to Server installed with SQL/SQL Express.
2. launch SQL Server Configuration Manager.
3. Go the database instance, right click and choose Properties.
4. Go to Filestream Tab and check all the check box, apply and closed.



Some article mentioned that there are user who face problem of installing RBS, to solve it, simply enable pipe line from SQL Server Network Configuration.












5. Now Access to SQL Server Management Studio, access the script bellow by creating a new query:

EXEC sp_configure filestream_access_level, 2
RECONFIGURE

6. Now, choose your database. Then run the script shows bellow:

use [WSS_TEST]
if not exists 
(select * from sys.symmetric_keys 
where name = N'##MS_DatabaseMasterKey##')
create master key encryption by password = N'Admin Key Password !2#4'

where WSS_Content is your SPF Database(when you create a new SPF web application).
In my case, i use WSS_TEST.
Note: The password i rather use default as given from microsoft technet article:
http://technet.microsoft.com/en-us/library/ee748631.aspx


7. After the script above successfully execute, go to your SPF web application database and run the following script:

use [WSS_Content]
if not exists 
(select groupname from sysfilegroups 
where groupname=N'RBSFilestreamProvider')
alter database [WSS_Content]
add filegroup RBSFilestreamProvider contains filestream

Just like before, rename WSS_Content to SPF web application database.

8. Then execute the last script from bellow:

use [WSS_Content] 
alter database [WSS_Content]
 add file (name = RBSFilestreamFile, filename = 
'c:\Blobstore') 
to filegroup RBSFilestreamProvider

The default external storage location was define at C:\Blobstore folder. This folder must not physically exist otherwise the script will cause error.
You can allocate it to a different storage. For my case, i rather use different folder for different web application. here i choose D:\WSS_TEST_Blobstore
Note: In case any changes to blostore location, you can reprovision by remove, then apply the script above.
to remove use sql query:


ALTER DATABASE databasename REMOVE FILE RBSFilestreamFile


where databasename is the name of the web application.


9. Download RBS client installer from:
 http://go.microsoft.com/fwlink/?LinkID=188395&clcid=0x409.
OR
Microsoft SQL Server 2008 R2 Feture Pack: 
http://www.microsoft.com/en-us/download/details.aspx?id=16978


Open command prompt with administrator rights, navigate to rbs client installer download folder. for example C:\temp, install with command as bellow:

msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="DBInstanceName" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1


where DBNAME is the database of the SPF web application, my case is WSS_TEST, DBINSTANCE is the instance name of SQL Server. my case is "PORTAL\SQLEXPRESS". So the result would look like this:

Note: Many articles mention  DBInstanceName is the name of the sql server instance, which is either SQLSERVER or SQLEXPRESS or any name cared by the user. Infact after tested, the DBInstanceName is "ComputerName\SqlServerInstance"  as shown above.  Link bellow shows a screen cap of rbs client installation steps which also shows how the instance name to be use:
http://netindonesia.net/blogs/andriyadi/archive/2010/07/27/configure-sharepoint-2010-to-store-files-blob-to-the-file-system.aspx

msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_TEST" DBINSTANCE="PORTAL\SQLEXPRESS" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1


For the rest of the web and application server if available,  install with command bellow to the additional web server:

siexec /qn /lvx* rbs_install_log.txt /i RBS.msi DBNAME="WSS_Content" DBINSTANCE="DBInstanceName" ADDLOCAL=Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer

Like before, replace WSS_Content to your web application database, replace DBInstanceName to sql instance name ("PORTAL\SQLEXPRESS").

Notice that a log file will generate and the size of the log file is about 1.38Mb. Open it and search with the text "completed successfully". Note that if your file size is less than 1Mb, then you may have not install correctly.

10. Finally go back to SQL Server Management Studio, explore your web application database, you should see some new table generated label with "mssqlrbs_"
Note: you can perform sql query with 
select * from dbo.sysobjects where name like 'rbs%'



















10. run SPF PowerShell with admin right and execute bellow:

$cdb = Get-SPContentDatabase ContentDatabaseName
$rbss = $cdb.RemoteBlobStorageSettings
$rbss.Installed()
$rbss.Enable()
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])
$rbss

where ContentDatabaseName is web application database name (WSS_TEST).
Note: To find out what ContentDatabaseName is, you can access to SPF Central Administration,  Application Management, Manage Content databases. Choose the desire web application.



Additional RBS for other Web Application
My sharing above only apply when you first configure your SPF for the first web application. Subsequently,  you are only require to configure your database to rbs enable with steps bellow:
1. Repeat steps 6 to 8 above to configure other web application with SQL Server Management Studio.

2. Run rbs client installer with command bellow:

msiexec /qn /i rbs.msi REMOTEBLOBENABLE=1 FILESTREAMPROVIDERENABLE=1 DBNAME="ContentDbName" FILESTREAMSTORENAME=FilestreamProvider_1 ADDLOCAL=EnableRBS,FilestreamRunScript DBINSTANCE="DBInstanceName"

Where ContentDbName is your web application database name, DBInstanceName is your SQL Instance name as i describe before, "ComputerName\SQLServerInstance"

Migrate from existing Documents/Files to RBS
1. Run SharePoint 2010 Management Shell with admin rights, execute command as bellow:

$cdb=Get-SPContentDatabase ContentDbName
$rbs=$cdb.RemoteBlobStorageSettings

Where ContentDbName is the database name of the web application

2. To List all the RBS Provider, execute:
$rbs.GetProviderNames()
 3. To set first provider to be active, execute:
$rbss.SetActiveProviderName($rbss.GetProviderNames()[0]) 
3. To migrate, execute:
 $rbs.Migrate()
4. Send a query at with "Select * from AllDocstreams where RBSID IS NOT NULL" to verify if there are records return after migrate. if none return, means files are remain at database.


Final Words
My sharing above may found similarity to other tutorial but what i describe here are those steps that really confuse me. I personally tried out and found error, try again and again until i finally made it.
all sharing above can be found from link as bellow:
http://technet.microsoft.com/en-us/library/ee748592
http://blogs.technet.com/b/pramodbalusu/archive/2011/07/09/rbs-and-sharepoint-2010.aspx

Thursday, December 29, 2011

SharePoint Foundation 2010 - Configure SPF 2010 with SSL accessing from internet

I will not talk about how to setup SPF web application. I assume that you already know, and had a web application ready.
You can have your SPF web application running intranet with or without SSL. My point is how you enable your SPF web application to be able to have SSL accessing it from outside, internet.

Wednesday, December 28, 2011

Sharepoint Foundation 2010 - Setup SPF 2010 with SQL 2008 R2(SP1)

I've done a lot of research about this topic, but none of them give a direct answer about how to install a SharePoint Foundation 2010 with SQL Server Express 2008 R2. Perhaps I am not an expert in SQL, or a database admin like others did. After sometimes of research, i finally found the solution that I want. So I decide to write this for my own reference as well as to those who still looking for answer.