Archives

Archives / 2009 / October
  • SharePoint 2010: #SPC09 - SSP is dead, long live Service Applications!

    Notes from the SharePoint Conference 2009 session "Introduction to Service Applications and Topology". This is my personal interpretation of what has been said during the presentation. Don't shoot me if I interpreted something wrong:-)

    In SharePoint 2010 Shared Service Providers (SSP's) are replaced by Service Applications. Services are no longer combined into a SSP. Services are running independent as a service application.

    So in MOSS 2007:
    SSP: combines services like Search, Excel Services, User Profiles, ... into a shared service provider.

    In SharePoint 2010:
    Service Applications: services like Search, Managed Meta Data, .., your service (20 services in SharePoint Server) are running "unboxed" and independent.

    So SharePoint 2010 provides a la carte unboxed services. You can configure which services are running on an application server. Per web application you can configure which services are consumed.

    When migrating MOSS 2007 to SharePoint 2010 SSPs will upgrade into Service Applications.

    SharePoint Foundation 2010 (WSS 4.0) provides the SharePoint Service Application Framework.
    New products like Office Web Apps, Project Server, Gemini (PowerPivot) use this application framework, and this platform can also be used by third parties or you to create custom services.
    You can plug your management UI for your service into the Service Management page.

    A web application does not communicate directly to a service application, but does this through a proxy:
    Web Application <-> Service Application Proxy <-> Service Application

    So a general workflow can be:
    Browser -> Web Front End ->(Request) Application Server ->(Result) Web Front End -> Browser

    SharePoint 2010 does contain a fault tolerant round-robin software load balancer with support for hardware load balancing, so it is possible to have multiple application servers.

    The Service Application infrastructure provides application isolation: each service application can use separate databases if needed and optionally run in separate app pool. There is support for multiple service apps for a service with different accounts and databases ==> Great for multi-tenancy (hosting for multiple customers on same platform)

    Services are flexible, secure and provide cross-farm federation:

    • Trust based security between farms, claims based authorization within the farm
    • Share to anyone, consume from anywhere
    • WCF based web services for communication
    • No direct DB Access
    For example: Taxonomy, has cross farm federation. Probably same for content types?

    Administration:

    You can manage which services are running on a server.
    In Central Administration UI: list of services, indented under a service you see the proxy.

    Through the wizards you get database names with guids at the end. Better to create manually form Central Administration, or create services through PowerShell.

    Per web application you can configure which services apps you want to be available. By default all web applications use all service applications available. You can change this into a custom configuration. Use the Manage Service Associations page for this.

    Service applications can be published to make them available outside the current farm. It allows you to select the connection type, for example https or net.tcp. Note that there must be a trust relationship with the farm that wants to consume your service. The service is published on a url. Through this url an other farm can find the published services. Url is in the following format: https://myfarm/Topology/topology.svc

    The other farm can connect to your farm through a remote service connection.

    Although manual adminstration and configuration of SharePoint 2010 can be done through Central Admin, the future of SharePoint administration is PowerShell.

    With respect to Services:

    Get-SPServiceApplication
    returns the set of service applications.
    Do Get-SPServiceApplication-name yourservice to get the service object. Do Get-SPServiceApplication -name yourservice | fl to see all properties of the service object.

    There are almost a hundred Cmdlets to manage your services.

    Side note: It now really becomes time that all administrators learn PowerShell. In my company (Macaw) we use PowerShell extensively for our Macaw Solutions Factory. Everything from configuration, build and deploy through DTAP is done with PowerShell.

    It is possible to delegate management of a particular service to someone, that person then has only access to that the management UI in Central Administration for that particular service.

    Access security: specified claims principals have access to a service application. By default the "farm claim" has access, but this can be removed ad more detailed claims can be configured for more granular access rights, or example read versus read-write.

    Service applications can spawn their own timer jobs.

    Generally ISV's will build service applications on the SharePoint Service Application Framework, but for large organizations it could be interesting for SI's to create services to specialized functionality and farm-to-farm fedaration .

    For repeatable configuration over your DTAP configuration, use PowerShell to create and manage the services.

    You can create complex farm configurations where farms can share service applications. For example: two farms can share the user profile service.

  • SharePoint 2010: Client side JavaScript Object Model Library written in Script#?

    Note: this blog post is based on experiences with the SharePoint 2010 Technical Preview version.

    SharePoint 2010 now extends the object model to the client. A remote object model proxy is available for C# development (including Silverlight) and a Javascript client library which can be found at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.js, accessible at /_layouts/SP.js.

    I tried to understand what happens in the Javascript code, did some document formatting on it to get it readable. But not really a Javascript wizard myself I didn't really got the hang on it. But when I scrolled to the end of the SP.js file I found the following lines:

    // ---- Do not remove this footer ----
    // Generated using Script# v0.5.0.0 (http://projects.nikhilk.net)
    // -----------------------------------

    Now I understand why some of the code is not that readable: it is generated code. Script# is used for creating the client side object model API!

    Have a look at http://projects.nikhilk.net/ScriptSharp for more info on Script#.

    I never dared to use Script# i a real project going into production, especially because the last version came out in August 2008. But Microsoft does not seem to have a problem with it. The Microsoft team is even running an older version that available for download (version 0.5.1.0).

    As far as I know the Office Web Applications (online Word, Access and PowerPoint) are written with Script# as well. See http://www.nikhilk.net/ScriptSharp-Large-Projects.aspx. So maybe it is time now to really dive into Script#! Anyone dare to it for production code in their projects already? 

    Disclaimer: All information in this blog post is based on my personal interpretation of information collected at the SharePoint Conference 2009 and experiences with SharePoint 2010 Technical Preview version provided to my company in the PEP program.


  • SharePoint 2010: Site exporting as WSP solution (Part 1)

    Note: this blog post is based onexperiences with the SharePoint 2010 Technical Preview version.

    In the good old days of SharePoint 2003 and 2007 it was possible to save a site as a template. These sites were saved as .stp files, I assume this acronym stands for SiteTemPlate, a non-documented closed format that did not allow for modification in the saved template files. so new sites could be created based on the template. SharePoint 2010 promises the possibility to save a site as a WSP package, the Windows SharePoint Services Package format that we all love in the development of our SharePoint solutions, because it promises seamless deployments through the farm.

    In this series of blog posts I will investigate the power of this new functionality, and take you, the reader, along the way in trying to answer the following questions that directly pop up into my mind:

    • Is the site really exported as a WSP? And how does it look like at the inside?
    • If we create a new site based on the template, do changes to content types at the site collection level propagate to the content types in the new instance of the site template?
    • In Moss2007 it was not possible to export a publishing site as a site template. Well, actually you could, but it was not supported. Probably because pages and content a site publishing site depends on, like master pages, pages layouts, the style library and site collection images are managed at the site collection level (in the root site of the site collection). Did this change in 2010, and how is it handled?
    • What is exported. The complete configuration of the site, or only changes to the site with respect to the initial site definition?
    • Can we learn some new stuff on authoring WSP’s from the generated WSP’s?
    • Visual Studio SharePoint Support has a project type “Import SharePoint Solution Package”, what does that do? Can we use the WSP generated by a saved site template?

    Ok, let get started. The first steps to execute are:

    • Create a site based on the blank site definition
    • Export the site

    To showcase some of the new tools in the mean time I will use SharePoint Designer to create our new site:

    1. Connect to the portal, and select the Subsites tab
      image
    2. Create a new site named wspexport based on the Blank Site template
      image
    3. This brings us a blank site:
      image
      To inspect some of the export functionality we create a custom list MyList with a Title and Description field, and a document library MyDocuments. We put some entries in the custom list and add a document to the document library. I assume that everyone knowing something about SharePoint knows how to do this.

      Adding a simple Dummy.txt document to the document library:
      image

      The home page after adding list view web parts for the MyDocuments and MyList:
      image 
    4. We go back to SharePoint Designer, set the site Title and Description of the site and save as template
      image
    5. Selecting Save as template brings you to the web site where you can specify the template site settings
      image 

      When save as template is done we get to the following screen:
      image
    6. Following the user solution gallery will bring us to the Solution Gallery. This is a location where solutions can be uploaded and downloaded. These solutions can probably be solutions that can include code that will be run in a sandbox. More on this in an upcomming blog post.
      image
    7. Right-click on the WspExportSite and select Save Target As… to save the WSP file to your location of choice.
    8. Note that the saved solution can be activated by selecting the arrow next to its name
      image

    This concludes the first post in this series. What do we have:

    • A WSP file on disk based on Blank Site containing a list and a document library
    • A solution in our solution gallery ready to be activated

    Disclaimer: All information in this blog post is based on my personal interpretation of information collected at the SharePoint Conference 2009 and experiences with SharePoint 2010 Technical Preview version provided to my company in the PEP program.

  • SharePoint 2010: Getting Publishing template working

    Note: this post is only relevant for people running the SharePoint 2010 Technology Preview.

    When I create a new site based on the Publishing Portal template you get a .../Pages/Default.aspx page with an error on it. The error seems to be generated by a ContentByQuery web part (the only web part) on the page. Add ?contents=1 to the url (…/Pages/Default.aspx?contents=1):

    image

    Check Out the page, remove the web part (Delete, not Close), and your page starts working again.

    Happy Publishing!

    image

    Disclaimer: All information in this blog post is based on my personal interpretation of information collected at the SharePoint Conference 2009 and experiences with SharePoint 2010 Technical Preview version provided to my company in the PEP program.

  • SharePoint 2010: When SQL memory usage keeps growing…

    After a single machine SharePoint 2010 install using the built in SQL Server Express my machine became really sloooooooow. After checking the processes it became clear that SQL server was eating memory. This is the default behavior of SQL Server.

    I tried to install the SQL Server 2008 Manager Express, but the installation failed. The SQL Server Express provided with SharePoint 2010 seems to be a newer version than the SQL Server 2008 Express version.

    After a long search on the internet I finally found how to set the memory limits for a SQL Server instance through osql.exe.

    First thing to do is to determine which instance you want to limit. One way of doing this is by finding the process ID using the built in Task Manager, and then use the Sysinternals Process Explorer to determining what instance is running under that process ID. On my machine .\SHAREPOINT was good enough for connecting to the SQL Server instance used by SharePoint.

    1. Launch a command prompt
    2. Start the SQL prompt, connecting to the desired instance (e.g. .\SHAREPOINT)
    3. osql -E -S SERVERNAME\<INSTANCENAME>
    4. Execute the following commands to enable setting of advance options:

      USE master
      EXEC sp_configure 'show advanced options',1
      RECONFIGURE WITH OVERRIDE
      GO
    5. Execute the following commands to set the maximum memory in MB. Replace 200 with your desired setting (I use 200MB):

      USE master
      EXEC sp_configure 'max server memory (MB)',200
      RECONFIGURE WITH OVERRIDE
      GO
    6. Execute the following commands to disable advanced settings, for safety’s sake:

      USE master
      EXEC sp_configure 'show advanced options',0
      RECONFIGURE WITH OVERRIDE
      GO
    7. quit

    Disclaimer: All information in this blog post is based on my personal interpretation of information collected at the SharePoint Conference 2009 and experiences with SharePoint 2010 Technical Preview version provided to my company in the PEP program.

  • SharePoint 2010: #SPC09 - Notes from the keynote

    Some quick notes I took about things I found interesting from the two keynote speeches of the SharePoint Conference 2009.

    Steve Ballmer keynote

    • SharePoint 2010 Beta release: November 2009
    • SharePoint 2010: RTM in First half 2010
    • Visual Studio Beta 2 released today!!
    • SharePoint Designer remains free in the 2010 version

    Versions of SharePoint:

    • SharePoint Foundation 2010  = WSS
    • SharePoint 2010 for Intranet Standard
    • SharePoint 2010 for Intranet Enterprise
    • SharePoint 2010 for Internet Standard
    • SharePoint 2010 for Internet Enterprise
    • SharePoint Online (for Intranet)
    • SharePoint Online for Internet facing sites (yes!)

    Jeff Taper keynote

    Code name Gemini becomes PowerPivot: 100.000.000 rows in Excel, publish to the server, powered by Analysis Services 2008 R2 (its FAST!!)

    Product names for PowerPivot:

    • Sql Server PowerPivot for Excel
    • Sql Server PowerPivot for SharePoint

    Disclaimer: All information in this blog post is based on my personal interpretation of information collected at the SharePoint Conference 2009 and experiences with SharePoint 2010 Technical Preview version provided to my company in the PEP program.

     

    .

  • Visual Studio: alway run as administrator

    I’m currently developing on a 64 bit Windows Server 2008 R2 that is domain joined, so I log in with my domain account and user access control is enabled. I need to run my Visual Studio as an administrator, because otherwise I get all kind of errors. I can do this by right-clicking on the Visual Studio Icon and select “Run as administrator”:

    image

    The problem is: I forget to do this all the time, and I ALWAYS want to run Visual Studio as an administrator.

    You can enable this as follows:

    1. Right-click the Visual Studio icon and select properties
    2. On the Shortcut tab (the default tab) select Advanced
      image
    3. Select Run as administrator
      image 
    4. Click OK

    This will work on any program, and on any OS with user access control (Vista, Windows 7, …).

    In order to be able to do this you must be added to the Administrators group on the local machine. If you don’t have the permissions to do this, login with an account that has enough permissions, or login with the local administrator account.

    You can do this in the Edit local users and groups program (Start –> Search programs and files… type users):

    image

    When you start up Visual Studio you will always get a warning from User Access Control with the question if you want to allow the program to make changes to your computer. Don’t know if you can prevent this popup.