Wednesday, January 20, 2010

Configure Form Based Authentication in SharePoint Server 2010.

Form Based Authentication is used by all of companies who have deployed SharePoint site over the internet or they have the SharePoint sites published. Form Based Authentication is a feature provided by ASP.NET 2.0. As the name tells that it gives you a form for authentication when you try to access the SharePoint site (similar to a pop-up box that you get when you access the SharePoint site using the Windows authentication).In SharePoint the authentication happens in the IIS and the authorization happens in SharePoint depending on the permission given to ths user.The Form Based Authentication is widely used when the people accessing your site are not the part of your Active Directory (AD) or basically not the part of your domain and at the same time you have a requirement telling that you would like these people (who are not the part of AD), when they try to access the site they would be authenticated. The only way possible is by storing the user credentials in a repository ( other than AD ) and telling SharePoint to use that repository as the authentication provider. In MOSS 2007 we could store the user credentials in AD , ADAM (Active Directory Application Mode) and in SQL Server. For SharePoint to use the Form Based Authentication (FBA) we have to do some amount of custom coding. So if you are familiar with the configuration of FBA in MOSS 2007 this post should not be very difficult to follow. Next I would discuss the steps that took to achieve the FBA in SharePoint Server 2010 using SQL Server to store the users.
  • To start configuration form based authentication create a new web application and choose the Authentication as Claim Based Authentication. 
  • Choose the new IIS Site and mention suitable port number or mention the host header. If the host header is specified then remember to add  A-record in the DNS.
  • In the security configuration section choose NO for allow anonymous access and for the use of SSL.
  • In the Claims authentication types tick the "Enable Windows Authentication" and under that choose NTLM in the Integrated windows Authentication.
  • Next check the "Enable Form Based Authentication" and under that mention the name for ASP.NET membership provider name and the ASP.NET role manager name. I gave sqlmember and sqlrole respectively.
  •  Leave the other options to the default and Click OK and create the new web application.
  • Also create a site collection using a suitable template.
Now we need to create a database in SQL Server in which we would be storing the users credentials. For that you need to go to C:\windows\Microsoft.Net\Framework\v2.0.50727 and there look for a exe called aspnet_regsql. Double click on the exe and a wizard will pop up. Click next on the first and second screen of the wizard. In the third screen enter the SQL Server name and leave the database name to default.Click next and then you would have created a database that you talk to a ASP.NET Application.The created database name would be aspnetdb. Now we need to create the users in the SQL Server. You can either write a application or code that helps you do this or use a tool (like I do) and create the users easily. The tool that I use is called Membership Seeder . This tool is available at http://www.codeplex.com/ . You will find many other similar tools in this web site. Any tools used from codeplex site in production is not supported by Microsoft. This tool is basically used to create dummy users in the aspnetdb. I will not cover how to use the tool as the instructions are given in the site where you download this tool. By the way this tool is FREE. Once the users are created then we need to deal with the coding aspect of the configuration.We need to make chances in three web.config file and they are:
  1. The newly created Web Application.
  2. The Central Administration Web Application.
  3. The Security Token Service Application.
So lets start of with the central administration web.config file, which can be found in C:\inetpub\wwwroot\wss\VirtualDirectory and here double click on the folde with an usual number. In my case the folder name was 23018. All other virtual directory except central administration virtual directory would have the servername and the port number or the host header name and the port number. After opening the CA folder, create a new folder and take the copy of the web.config file and save it inside the new folder. This step is very important as you are taking the backup of the web.config file which is the most important file for the web application. Once you have backup copy of it then open the web.config, which is a XML file. It is preferable to open in Visual Studio as it easy to edit in it. If you dont have VS then it can be opened in notepad as well. Inside this webconfig file search for the "system.web" tag .Once you find it you need to add the CODE1 above the tag "system.web" and CODE2 below the tag "system.web".

CODE1

CODE2
One you have done the above, save the file and close it. So the CA web.config file is done. Next lets go to the STS (Security Token Service ) service application web.config file. The easy way to get to the STS web.config file is open IIS Manager. Expand the sites section and then expand the SharePoint Web Services section. There you would find the SecurityTokenServiceApplication, click on it and open the content view (content view option is avalable in the middle section at the bottom of the IIS Manager). Next click on explore option from the Actions Sections (the rightmost section). Or just follow this path : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\SecurityToken. This will lead you to the web.config file of the STS service application. Again do not forget to take the backup of this file before making any chances to it. Then open the web.config file. In the STS web.config file you will not find the tag "system.web". Hence we need to opening the closing tages of the "system.web". (Refer the snapshot) .So we need to add the CODE1 above the "system.web" and the CODE 2 just below "system.web". So the entire set of code would look like the following:


I pasted the entire above code under the closure of the tag "system.net" in the STS web.config file. Now the last place where we need to do the coding is the web.config file of the newly created web application. But making modification in this web.config file is slightly different as we would already have the tags for and . Hence we need to be a bit more careful here. So open the virtual directory of the newly created web.config file by navigating to C:\inetpub\wwwroot\wss\Virtual Directory\ .Once opened take the backup of the web.config file by creating a new folder and pasting a copy of the web.config file in it. Open the web.config file and search for the membership tag defined. You will see that we already have the membership and the rolemanager  providers in the web.config file. We just need to add our membership and roleprovider entries. In the below snapshot I have highlighted the code snipnet that you need to add in the web.config of the newly created web application. Also notice that the rolemanager provider and then the membership provider.


We also need to add the CODE1 as well. Remember that you add above the and this SHOULD be above the and provider that you just added. The best way is to find the first occurance of the "system.web" in the web.config and add the CODE1 just above it.

Once the above things are done then the hardest part is finished. Now we need to the CA site,click on the Manager web application, choose the newly created web application and then click on User Policy. You would get a pop-up box. Click on Add Users and then choose the zone ( in our case it is the default zone) and then add users. These users are the one that you created using the Membership Seeder tool are are available in SQL Server aspnetdb database. If the user name gets resolved then the code is working fine. Next type the URL of the newly created web application and you would get a new form where in the drop down you would have two options. 1. Windows Authentication and 2.Form based Authetication. Choose Form Based Authentication and you would be given another form to add the username and the password. Put the username of the user present in the aspnetdb and the associated password. Then you would be able to login in and hence you have successfull configured form based authentication.

Hurry!!!..Finally Done!!....

Tuesday, January 19, 2010

Content Type Publishing in SharePoint Server 2010

This particular post has to do with the improvements in the concept of Content Types in SharePoint Server 2010.

So before going into the improvements of content types, lets first discuss what are content types and the limitations of it in MOSS 2007. Content Types are used when you would like a document library to give you the option to create an excel sheet, a word document , a powerpoint presentation etc when you click on the new option. Content types enable you to store multiple different types of content in the same document library or list. For example : You have created a single document library for your sales and marketing team .The sales team have their own word template and the marketing team have their own word document but you want them to use the same document library and both the team should get the option of creating their own document depending on the template suitable for their needs. For more information on content types, please refer the following two links:
(In this post I will not discuss how do you create the content types and explain the scenario's with regards to MOSS 2007)

Now lets talk about the limitation. In MOSS 2007 the content types were limited to the site collection level. That means, if we create the content type and would like to use it in another site collection it was not possible out of the box. We would have to do extensive customization to achieve it. But in SharePoint Server 2010 there limitation has been addressed and now we can publish the content types in one site collection and use them in another site collection. So now lets directly go ahead and see how we can do the publishing of the content types:
  • Create a site collection. For example I created a site collection called http://roshan-pc which is running on port 80.
  • Next we need to enable one of the site collection feature called the "Content Type Syndication Hub".
  • Once enabled you need to go to the CA (Central Administration ) site and click on manage service application which is under the Application Management section.
  • In SharePoint Server 2010, the content types are part of the Managed Metadata Service.Hence click on the managed metadata service in the service application page. Remember not to click on the name "Managed Metadata Service " as its a hyper link and it will take you to the Term Store Management page. Just click beside the name and then click on the properties tab present in the same page ( in the ribbon).
  • Once you clicked, you would get the pop up box.Scroll down to the end and there would be asked for the site collection URL which would be the content type hub. I typed http://roshan-pc and also it is recommended that you choose the option that tells "Report syndication import errors from Site Collections using this service application."
  • Then you will be directed back to the Service application page and now you need to select the Managed Metadata Service Proxy/Connection which is just the metadata service. Again do not click on the name. Click on the proxy and click on properties (available in the same page in the ribbon).
  • You would be given a pop-up box where you need to check mark the third option which tells "Consumes content types from the Content Type Gallery at http://roshan-pc " (in my scenario).
  • Then the publishing of the content type has to be done by going back to the site collection http://roshan-pc and there create a content type. I created a new content type called PRODUCT with the site columns as Product Name and Product ID.
  • Once done with you get to see an option in the same content type page called " Manage publishing for this content type" (Under settings the last option)


  • Click on that and you would be prompted to publish the content type. Click OK.
  • Next create another site collection which can consume the published content type (In my case I created a site collection called http://roshan-pc:81/ 
  • Next need to start two timerjobs which are responsible for the publishing of the content types for which you need to go to the CA site and click on Monitoring.
  • There you will find a link for Review Job defination.Click it.
  • Now you need to start two timerjobs. First one called "Content Tyep Hub", just click on this timerjob and Click Run Now.
  • Next you need to choose the second timer job called " Content Type Subscriber". Notice that if you have created two web application that you will two timerjob of the same type. Choose the one where you would be consuming the published content type. That is http://roshan-pc:81
  • Now go to http://roshan-pc:81/ and then to the site content type you will find the content type present there that was published fron the site collection http://roshan-pc/
One very important point to remember here is that if you use two different which are in two different web application then those two web application should be associated with the same Managed Metadata Service.

More on content types in the same post very soon.....

Monday, January 18, 2010

Installing SharePoint Server 2010 on Windows 7

I am back with another post.

This post is regarding the steps that you need to consider if you want to install SharePoint Server 2010 on Windows 7. Yes, SharePoint can now be installed on windows 7 and on windows vista as well. This provision is given for developers only who can test and build application or tools on top of SharePoint Server 2010. SharePoint Server 2010 running on any client OS is not supported in production.
The product team came up with this idea because with MOSS 2007 we got not install the product any client O.S and the developer who did not need a server OS for their developement, had to install Windows server 2003 or Windows Server 2008 and then work with MOSS 2007.

So now lets see how we can install Windows 7:
  • First decide the OS on which you would like to install SharePoint Server 2010. This blog is for installing SharePoint Server 2010 on windows 7 (64 bit).
  • Put the media and open the setup file location.
  • Open the location  "C:\SharePointFiles\files\Setup\config.xml".
  • Add the following xml code : "Setting Id="AllowWindowsClientInstall" Value="True"  (at a look at the snapshot)
  • After adding the xml will look like the following. The snapshot is related to SharePoint Server 2010 and not SharePoint Foundation 2010 (the new name for WSS 4.0). The above code is case sensitive and hence maintain the same case.

  •  Next step is the longest and the most important one. While you are installing SharePoint Server 2010 you will not be able to run the Pre-Requisite Installer as it will only run on Windows Server 2008 with SP2 and Windows Server 2008 R2. So you need to download and install all the prequiste manually. To make it easy to find all the pre-requiuste at a single place please follow this link .  You will find all the pre-requistes here.
  • Once the pre-requistes are done then you need to make your IIS ready on Windows 7. For that we have given a script that you can find in this location . Or the way I did was to enable the IIS first from command line and send enable the features manually. Below is the screen shot of the features that I enabled manually.








  • Once this is done click on the setup.exe which you find in "C:\SharePointFiles\Setup.exe".
  • You can choose Standalone or Advanced Option ( to choose complete) depending on how much resources you can give for SharePoint. I choosed Standalone for two reasons. 1. I did not have a full-blow SQL Server 2. My laptop on which I am installing has only 4GB RAM.
  • Its left to you on what you want to choose.
  • Once done with the first phase of installation, then you need to install the SQL Server 2008 KB 970315 x64 . Its the Cummalative Update 2 for SQL Server 2008 SP1.
  • Then complete the configuration wizard and yes you are done.
Enjoy Sharing on Windows 7.

Saturday, January 9, 2010

Visio Web Access

Visio Web Access is another new web part in SharePoint Server 2010. As the name is similar to Excel Web Access, it also has the same functionality as Excel Web Acess but with respect to Visio. If the pervious statement is confusing it will be clear by the end of the post.

Visio is used in most of the companies when it comes to network design or if they want to have a pictorial representation of the infrastructure. For Example: If the company manager wants to know who the servers in his company are connected to one-another and would also like to know the where the firewalls are placed, where do they have Ethernet switches etc. visio is the tool used to give him the answer. Most of the work in visio (as far as I know) is done connecting the items in the visio page. It also gives us real time information.Say we have created a visio diagram for tells us details or SharePoint environment and say our Database server is down then we can configure the visio diagram to show us a RED color on the Database server.

Now lets see where and how can we use Visio in SharePoint. If visio file can be put into a SharePoint Site as a web part and if that visio shows us the status of all the servers of the company then wouldnt ot be great. The Network Administartor would easily come to know which server has the problem or which server is misbehaving and get it fixed. So keeping this in mind we developed the visio web access web part which helps us to put the web part anywhere in the SharePoint site and then have the visio present in that web part.

Now lets discuss that steps to achieve the visio web access:
  • In Visio 2010 (Beta) create a network diagram ( a simple one)
  • Next it is very important to save it as vwi file.
  • Upload it into one of the document library.
  • Next go to a page, click on edit page, click new web part and choose visio web access.
  • Once the web part is added, then will click on modify edit web part. In the Diagram URL put the URL of the vwi (visio) file.
  • Click Apply and OK.
If you have done all the above steps you should be done with the visio in the web part. You will also see that there is a zoom-in and zoom-out option.

Enjoy it!! :)

Tuesday, January 5, 2010

Conceptual Understanding of SharePoint Server 2010 Search Architecture - Part 1

Enterprise search is one of the key selling points of MOSS 2007 but at the same time this feature had its own problems.Before we go into the New Search Architecture of SharePoint Server 2010 lets just talk little bit of MOSS 2007 Search so that understanding of the SharePoint 2010 search becomes easy.

The MOSS 2007 Search architecture mainly consists of two main components: Query Server and the Index Server. The index server was the one which would take the content source(s) as its input and would generate content index. This content index would be stored in the index and also will be propogated to the query servers. This propogation is real-time which means that as soon as the index is created for an item, a copy of the index would be sent to the query server also.The role of the query server would be to get the request from the end user, hit a query to the local content index that it has and give back the user with the right set of results.In SQL Server there would one important database related to the search known as SSP_Search_DB which had all the information except index itself because the index would get stored in the file system and not the database.Also I would like to highlight that the keyword and bestbets that you configure from the site collection administration section (in site actions -> site settings, within a site collection) is stored in SSP_database and not the content database.Talking about the problem that this architecture had was the single point of failure of the Index server. We just could not find a easy solution (or rather no solution ) to provide redundancy to the index server. No easy failure over mechanism for the index server.

Now lets jump into the Search in SharePoint Server 2010. So when we started designing the search for Sharepoint 2010 we realized that index was one role/engine that did most of the job of the search and also searching infomation in a large index is also difficult ( it would not give split second search results to the end user). So the answer for both the questions were break the index into smaller and distribute them.This would give us redundancy,if we want to, and also searching in smaller chunks of data is much faster than searhing in a large file.So before proceding further I would like to make some terms clear which may be new and also confusing :).

  •  In SharePoint Server 2010 we call the index server as the CRAWL server or crawler .Crawl Server primary role is same as index servers' role i.e., to index the data and create/prepare the index. So going forward I would be addressing the index role/engine/server as crawl(ing) server.
  • The huge index file that was generated in index server in MOSS 2007 is broken down into smaller chunks and are known as INDEX PARTITION.
  • Query Component and Crawl component are two more new terms.I will be explaining about these terms later in the post but from the term names you can guess that query component has to do something with quering the index partition and the crawl component is used to crawl (used to index).

In SharePoint Server 2010 when you create/configure the search service application, in SQL Server 3 databases get created. They are:
  • Administration database.
  • Crawl database.
  • Property database. 
Administration database is more like the SSP_Admin database. The crawl and property database are again something new in SharePoint Server 2010.

  • Crawl database : It would have all the information except the index itself in the database like crawl log, crawl properties etc..
  • Property database: Property database would hold the properties associated with the data that is being crawled. Such as the rating information,tags,notes etc.. Basically the metadata associated with the content.
So lets start from basic and simple example.
Once you have created the search service application, click on the search service and you will be see the below screen


Crawl component and the query component can be put on two different servers/machines.

The crawl component is the one that would crawl the content source(s). and create the index partition.Once the index partition is created,the crawl component will send the created index partition to the query component or the query server.When the request comes from the end user the query component would look into its index partition and send back the result. Its important to note that the crawl component will NOT store index with it. As soon as the crawl component prepares the index partition it sends to the query component or the query server.Only the query server hold the index parition with them. At the same time we can multiple crawl components to crawl multiple content sources. Also every crawl component should be associated with one crawl database because the crawl component would write into that database the details about the crawl.We can also have multiple query components.

So before proceeding further, let me show what are the components that you can create in Search:


 As you see that we can create multiple crawl component, multiple crawl database, multiple Index partition and query component and also multiple property database.

Now lets discuss when and how can be make use of multiple query components.Lets take an example: Say we have a large content source and we have a crawl component crawling the content source.At the same time we also have 2 query components.So here when the crawl component crwals the content, it creates the index partition and also it sends the index partition to both the query component. Its a real time propogation.When the Web Front End gets the user request, it sends the request to both the query component and the results are displayed. (for better understanding on how web front end interacts with query, refer my previous blog here )

More on Search every soon....

Thursday, December 31, 2009

Introduction to Service Application - Part 2

In my previous post on "Introduction to Service Application" I have explained the concept of why did we come up with Service Application model,what are the different types of service application available as of now (till Beta 2) and also explained terms such as proxy,proxy group. At the end I also listed down the service application (SA) that can be shared across farms.

This blog is a continuation of my previous post and this post I will be discussing the concept of cross farms v/s child farm (just a short topic but an important one!!) and also some more topics....

CHILD FARM : In MOSS 2007 we used to create SSP and share the services of that SSP with other farms.So the farm thar is providing the services would be the parent farm and the farm that is consuming the services is the child farm.Most of the services were consumed by the child except excel services as this service was not able to share with other farms.One major problem in this scenario was that the child farm should have access to the parent farm database which led to lot of confusion and misconfiguration.
CROSS FARM : In SharePoint Server 2010, as you may already know that we dont have the concept of SSP and so we had the parent-child relationship at all. What we do have is the concept of cross farm where any farm can consume services from any other farm
For instance Say we have FARM A and it has managed metadata service application running the we have another remote farm called FARM B. Now we decide that FARM B would like to consume the metadata service from FARM A. So we just need to publish the metadata service in FARM A and when from FARM B we try to connect to FARM A (for the metadata service) a proxy will be created in FARM B and it will take care of the communication.

(I will be writing a seperate blogpost on how to publish and consume the services.)

The main advantage of the cross farm is that the FARM B doesnot need any permission on the databases present in FARM A.

Also any web application consume services from any farm in any combination. For example:

FARM A: Managed Metadata Service, BDC,Secure Store Service.
FARM B: Search and web analytics.
A Web application (WA1) is created in FARM A. So WA1 can consume BDC,Search,Metadata service or any combination of the service that are published and available.That is we can consume both local and remote service applications.

We can also have an entire farm build that can just host all the services.This is help in scaling the services to a very large extent.

Lastly all the Service application communication happens over HTTP and the service application are built on WCF.

What is new in Excel Service in SharePoint 2010??

Excel Services was one of the features that was widely used by large organisations with MOSS 2007. It was used to render the content of Excel worksheet in Internet Explorer so that you can only one true copy of the worksheet rather than everyone carrying there own copy and modifying it.
Also at the same time we also had Excel Web Access Web Part which could be used to publish the excel sheet anywhere in the site.

With SharePoint Server 2010 the Excel Services Team went one step ahead. They introduced a new API called REST API (REpresentational STate).

REST API is a easy programming feature for "non-developers" to easily access and display the information present in the excel worksheet. You may be confused with the above sentence as it contains the words programming and non developers. What I mean by the sentence is REST API feature can be achieved by just going manipulation to the URL which can be done by a non-developer (like me).At the same time it gives developers a platform on which they can do very complex operations as well.

Now lets talk where and how can we use the Excel Services with REST API:

For Example : Say you create a worksheet and that worksheet has the number of hours that you have worked for the entire week. Something similar to the below image




Now lets say you and your team have a requirement from your manager to show a graph of the work done in the entire week.
So you create an interal site and you would like to embed the above "chart/graph" in that site. You have to first publish the particular excelsheet to the a document library (lets consider we have a document library
called Worksheet library and the excel sheet is publish to this using excel services.The procedure to publish the excel sheet using excel services remains the same as in MOSS 2007).

Once the above is done, using the REST API by writing the following URL in the address of the  image web part in SharePoint Server 2010 you will get the chart/graph. (for time being ignore what exactly does the URL mean and do).

http://teamsite/sites/manager/_vti_bin/ExcelRest.aspx/worksheetlibrary/Book1.xlsx/Model/Charts('WorkChart')

Hurry!!!!..... Thats the end result of REST API. You have the chart in the site.!!!.....

The data shown the graph is NOT static, its dynamic. That means when whenever the value chages the graph gets automatically updated in the site.With the REST API, any changes in the workbook are reflected in the data that is returned. This includes the latest edits made to the workbook, functions that have recalculated (including User Defined Functions), and external data that is refreshed.

The REST API can also push values into the workbook, recalculate based on those changes, and return the range or chart you requested after the effects of the change have been calculated. For example, in the sample spreadsheet above, the chart is displaying the effects of a Actual Work done = 80% .With REST, you can request a chart displaying the effects of a Actual work done = 70% by adding a parameter to the URI that changes the value of cell B4 to 70%.
Now we know what the end result is and how to achieve using. Next lets have a discussion on how we came to that particular URI.

Firstly I have a site collection built and named as "teamsite". In that team site I have created another site and named it as "manager" and in the manager site I also have a document library called "worksheetlibrary" to which I have published my excel sheet.
So to access the excel sheet i would type the URI as http://teamsite/sites/manager/worksheetlibrary/Book1.xlsx (assumption that the excel sheet is saved as Book1.xlsx)

Now in order to use the REST API in the URI we insert _vti_bin/ExcelRest.aspx just before the document library in the above URI.Hence the URI would look like

http://teamsite/sites/manager/_vit_bin/ExcelRest.aspx/worksheetlibrary/Book1.xlsx

Now we need to get to the items in thee excel sheet like the chart or the table. For that we add /Model at the end of the URI. So now the URI is

http://teamsite/sites/manager/_vti_bin/ExcelRest.aspx/worksheetlibrary/Book1.xlsx/Model

Once you add "/Model" to the URI and hit enter you will find 4 terms listed in the Internet Explorer page. They are:

1.Ranges.
2.Charts.
3.Tables.
4.PivotTables

Important
-----------
Before proceeding further you need to make sure that the chart and/or the table in the excel are named ranges. Basically you need to select the chart and give it a name and if you also interested in publishing the table with the Hours Worked and Billed Time data then select the entire table and give it a name.(Giving the name is simple,just select the table and left top corner above the cell 'A' type the name that you would like to give.) THIS HAS TO BE DONE BEFORE PUBLISHING THE EXCEL TO THE DOCUMENT LIBRARY.

Next at the end of the URI type /Ranges and you will be given the list of named ranges that you have defined in the excel sheet.

Lastly you need to choose which range you would like to publish. In out case since its a chart the URI will become

http://teamsite/sites/manager/_vti_bin/ExcelRest.aspx/worksheetlibrary/Book1.xlsx/Model/Charts('ChartofHours')?$format=html

(ChartofHours is the name for the chart that I defined)

or you just also just type

http://teamsite/sites/manager/_vti_bin/ExcelRest.aspx/worksheetlibrary/Book1.xlsx/Model/Charts('ChartofHours')

Once the chart is displayed in the IE page copy the URI, go the SharePoint site,edit the page,click on image in the ribbon menu, you will be given two options,choose "from address", put-in the URI and its done.

Now whenever you can values in the excel sheet that chart also gets updated in the site.

For more information on Excel Services refer the following links:
1.Excel Services - Rest API Part 1
2.Excel Services - Rest API Part 2

Tuesday, December 29, 2009

Introduction to Service Application Part 1

One of the major investment in SharePoint Server 2010 is moving away from Shared Services Provider and get into the new concept of Service Application.

Before going into details of Service Application lets first talk why did we move away Shared Services Provider (SSP)??..One of the main reason for moving away from SSP was that we could not choose/select specific services that we wanted to use in that particular web application. For Example: Say I create a SSP and I have search, user profile,excel and BDC services enabled in this SSP then any web application that gets associated with that SSP will get all these services even if that Web application doesnot need/makes use of it.
Also another major problem was under the hosting environment.If a partner hosts MOSS 2007 and say he has 2 clients where one of the client has a requirement telling that it needs BDC and Excel , and the another client has a requirement telling that it needs Search, BDC and User Profile then we had to create 2 SSP and also we had to provide an entire web application for the 2 clients. So in total in SQL Server we would have 8 SSP databases and 2 web application databases. This was not a feasible solution and hence hosting on MOSS 2007 was not recommended.

So SharePoint Server 2010 we came up with the concept of Service Application where each service application is independent (without any relation to SSP)and we do not have a SSP site as these Service application are configured/controlled from Central Administration (CA) site. Below are the list of Service Application that are available (till Beta 2):
  1. Access Services 
  2. Business Data Connectivity service.
  3. Excel Services
  4. Managed Metadata Service 
  5. People (User profile) 
  6. Search Service Application  
  7. Secure Store service (formely known as Single Sign On) 
  8. State Service  
  9. Usage and Health Data Collection
  10. Visio Graphics Service 
  11. Web Analytics Service
  12. Word conversion service
As said above that these service application are independent,so any web application can consume and combination of service application(SA). For Example : Say a web application needs only BDC, secure store service and web analytics ,it can be achieved.

If you have installed SharePoint Server 2010 successfully then, you would get a wizard to install the service application as well.For the first time when the service application have been installed they would a part of the default proxy group. (I will talk about proxy and proxy group later in this blog). We can create different proxy groups and each group can have any combination of service application.While creating a web application we do get the option to choose the proxy group. By default, the default proxy group would be selected (the one that we created when we installed SharePoint and ran the wizard in SharePoint).

Now lets talk about the two important terms : Proxy and Proxy Group
Proxy : As soon as we create a SA a proxy would be created to it. Proxy is nothing but a virtual link using which the web application(WA) will talk with the SA.Proxies are basically WCF service.
Proxy Group :  proxy group is a group of SA's that can be associated with a web application. for example: default proxy group.A proxy group can have any combination of SA.

Important
----------
If we create a custom proxy group and associate that custom proxy group with a WA, then we CANNOT re-use the same custom proxy group with another WA.


Now going back to service application(SA), we can provide process isolation to the SA. We can choose if we want to use a new application pool or use an existing one.by default all the service application virtual directories would be under SharePoint Web Services in IIS. You would find a list of GUID's and if ou want to know which GUID is associated with which SA, the easiest way is to switch the view to content view in IIS and once you click on the GUID the name of the service application would be displayed in the right hand window.There is also another way of knowing which GUID to SA association, that is by using the powershell but I guess the content view is the simple and easiest way to find it out.

We can also create multiple instance of Service application. Each instance will have its own proxy. We CANNOT create multiple instance of proxies.

I would llike to give you some details of the databases for the Service Application.Some of the service application have there own databases and the list is as below:

Business Data Connectivity service.
Managed Metadata Service
People
Search Service Application
Secure Store service (formely known as Single Sign On)
State Service
Usage and Health Data Collection
Web Analytics Service
Word conversion service
Perfomancepoint.

Lastly I would like to throw some light on the sharing of the service application. I will be writing a seperate blog on the steps to follow to share/publish the service application. But for now I would like to note down the service application that can be shared across farms.Yes...you are right not all service application can be shared across farms. The ones that can be shared are as follows:

People
Managed Metadata Service.
BDC
Search Service.
Secure Store
Web Analytics.

As of now thats all on service application.....................

Monday, December 28, 2009

Document Management in SharePoint Server 2010

From past couple of days I have been investigating the New Document Management Capabilities in SharePoint Server 2010 and here are some of the terms that I came across.

*Document ID
*Document Sets

Let me define the above in a simple and understandable way:

Document ID
--------------
When do we need an ID?..In MOSS 2007 we did have a column type called "ID" which would assign unique numbers to the document or list items in the document or list library. As we saw that this ID was restricted to the library level only. What if we need to have unique string ID's to all the document across the site collection. The answer was given in SharePoint Server 2010 with Document ID feature.

This is a feature that you need to enable in the Site Collection Features. Once done, all the document will get a unique ID and this unique ID will STICK to that document forever. That means when a document is assigned an ID it also provides a URL using which you can track down the document regardless of the location of the document.Even if the document has been moved to different site collection the Document ID that was associated with it remains with it.

The ID's prefix can bedefined as well. For Example : If you have a site collection made for the HR team, you can have the ID prefix as "HRDoc" and the actual ID would be something like HRDoc 1-1, HRDoc 1-20 etc.Basically the format Document ID can be customizable.

Document Set
---------------
Document Set as the name tells is a set of documents that are treated as a single unit of work.In MOSS 2007 the closet that can be related to the document set was a folder. Document Set can be called as a improved and much sofisticated version of folder.

It is again a feature and so it has to be enabled in the site collection feature.Once the feature is enabled it can be used in a document library to create document set. Wait a minute!!!!!................. Document set is a special content type in SharePoint Server 2010. Which means that if you want to use the document set content type in the document library if you to make sure that the document library is ready allow multiple content types.This can be achieved by following steps:

1. Go to the document library settings.
2.Click on Advance Settings.
3.Choose YES in the section which tells "Allow management of content types".
4.Once this is done now you need to add the document set content type to this document library.
5. Go back to the Library settings page.
6. You would see a section for content types and also a click that tells" add from existing content types".Click on that.
7. Choose the Document Set content type from the list and now the document library is ready to produce the document set types.

Once you have followed the above steps, click on the new document and you will find a new content type listed there known as the "Document Set".

Multiple content types can be associated with the Document Set.  For Example: A single document set can have one word document,one excel document and a presentation document.

The welcome page of the Document Set can be totally cutomized according to our requirements.

Also when you choose to download the Document Set, all the documents associated with the document set will be put into a zip file and then downloaded.

Since the document set acts as a single unit,a document ID will be associated with it. Even a workflow can
be assigned to the document set. All features like versioning, security permission can be given to the document set directly.

Last point about the document set is the concept of  "Shared columns". We can add columns to the document set and they get inherited to the documents that are present in the document set. For example: Say I create a document set called "Sales Proposal" and this document set has 3 content types (word,excel and ppt). Also I add a column to the document set called "Date".So what happens is that all the 3 content types will gert this column called "date" into them.

More on Document Management in some time........ :)

Sunday, December 27, 2009

Content Type Publishing in SharePoint Server 2010

Another improvement in SharePoint Server 2010 is the ability to publish the content type across site collection. Content types were restricted to a site collection in MOSS 2007. Now its possible that several site collection can use the same content type and also the changes, if any, made to the content type will also be propogated to the sites where the content type is being used.

Below are the steps to publish the content type:

1. Create a New Site collection.(for ex: http://sharepoint2010/sites/hr)

2.Go to the Site settings of the Newly created Site collection.

3. click on the Site collection features.There you need to activate the content type publishing hub.

4. Now since content types are a part of metadata service you need to go back to the central administration site.

5.Once back to the CA site (central Administration Site) click on manage service application and then click on the managed metadata service.(do not click on the managed metadata service connection)

6. Go to the properties of the service application.

7.At the very end of the Properties popup dialog box, you will find the section for Content Type Hub. Enter the URL to your content type hub site collection.

IMPORTANT
----------------
Once the association is made it cannot be changed back, which means if you want to use another content type hub, you need to create a new managed metadata service application.

8.Once this is done you have successfully configured your Content Type Publishing. Now any web application associated with that particular service application cam make use of the published content type.

Happy Publishing :)

Saturday, December 26, 2009

Chart web part

In SharePoint Server 2010 we have a interesting web part know as Chart Web part

Chart Web Part
----------------

Right now in Beta Bits you can find this web part under "Miscellaneous" section. This web part can be used to build chart from the data that is present in Sharepoint List, Excel Sheet (that is published using Excel Services), data from SQL Server and also from another web part that provides data. Its very easy to configure. For a chart using Sharepoint List follow the link Chart using Sharepoint List . Also the same can be achieved using data present in Excel. Steps to achive it.

1.Publish Excel using Excel Services to a document library (Excel Services remains same with regards to MOSS expect REST API).

2.Add the Chart Web Part.

3.Click on Data Appearance.

4.Put the Excel Workbook Path.

5.Range Name (very important)

6.Once you click next the data present in the excel sheet will be displayed. You can do the formatting as you need.

7.Bind data with the chart and you are done.


SilverLight Web Part on Sharepoint Server 2010

Today I was working with Sharepoint Server 2010 specially with the web parts and found one interesting web part known as "Silverlight web part" which is under Media and Content. When i try to add this web part it asked for a .xap file. Since I was not a developer I had very less idea about xap files.


Finally I got a got a xap file (basically a silverlight file) and when added it worked perfectly fine. It definatley made the life of non-developers (like me :) ) very easy.

Wednesday, December 23, 2009

communication b/w wfe and query during search

Very recently i was asked a question on a particular scenerio.
Scenerio : consider you have 1 wfe ,2 query servers, 1 index server and a clustered database server. The 2 query servers are NOT load balanced. So how will the wfe server communicate with the query server and an end user hits a search query.

After a long research the answer was when the end user puts some keywords for search the search.asmx is invoked. This search.asmx will send a request to both the query servers and which ever query server responds for the request the search.asmx( which is on the wfe) sends the keyword search request to that query server and the search result is got back.The query will look into the local index that it has and give back the result.

Monday, December 21, 2009

SharePoint Server 2010

This Blog is dedicated for SharePoint Server 2010.