Great book discounts at Packt Publishing in May on SharePoint 2010, Silverlight books

Last year I’ve been involved in technical reviewing 3 great books around SharePoint 2010 configuration, administration and development, as well as integration scenarios with Silverlight 4.

Throughout the whole month of May 2012, the Pack Publishing house is offering great discounts on a wide range of books involved these Microsoft technologies.

To benefit from this all you have to do is head out to http://www.packtpub.com/news/packt-microsoft-carnival choose your books and order.

Hope you have a great reading these are really some great readings,

C:\Marius

 

Installing SharePoint 2010 Server on Windows 8 Developer Preview

As I mentioned in my previous posts few days back I’ve decided to take Windows 8 Developer Preview for a spin by running it in a VHD boot configuration. As most of my time I’m involved in working with SharePoint 2010 Server it was more than obvious that I would be installing it.

But it was not that straightforward, here are my findings and the ways I’ve fixed it.

1. Install pre-requisites manually (W8 Developer Preview is still a workstation) as you cannot benefit from Prerequisites installer as you would do while installing it on  server. As a quick fixer, the Windows Identity Foundation 3.5 even if already installed it must be activated in “Turn Features ON/OFF” in manually.

2. I still used SQL 2008 R2 Express Edition, which handles the SQL dependencies already.

3. Install SharePoint 2010 Server and start the Configuration Wizard. It will all go smoothly up to the point when the Central Administration must be provisioned when it will fail with the following exception (see below):

Failed to provision the SharePoint Central Administration Web Application.
An exception of type System.Runtime.InteropServices.COMException was thrown.  Additional exception information: Filename: \\?\C:\inetpub\wwwroot\wss\VirtualDirectories\23516\web.config
Line number: 25
Error: There is a duplicate ‘system.web.extensions/scripting/scriptResourceHandler’ section defined

image

Basically this could mean either that indeed there is already a section or it might mean that while “parenting” occurs, same declaration must be already existent somewhere else, such as a machine.config

But in this case it means something else: .NET 4.0 being installed already, by default in IIS all Application pools will use it by default. So to fix it, one must be changing those back to using .NET 2.0 as you must know it already, but SharePoint 2010 doesn’t support .NET 4.0 (see bellow), and do it so for every of the SharePoint Web sites, as visible below.

image

Once all are changed, except for the SharePoint Web Services Root, start other Application pools and Sites that we’re created during wizard execution.

Now you could launch the Central Administration and it should work normally. Obviously as the “Start Menu” has been replaced by the Tile-based menu, you can easily find it as quickly as you can type SharePoint.

So, until next time happy SharePoint-ting fingers otherwise
c:\Marius

Windows Azure Tools not supported on Visual Studio 11 Developer Preview just yet

 

I’ve got my head around Windows 8 Developer Preview after installing it (I’ve documented how I installed on, in my post earlier) on my DELL E6510 machine by using the VHD boot capabilities available in Windows 7. After 3 auto-reboots, about 30 updates and more than 2 hours later, I had my fresh Windows 8 DP plus Visual Studio 2010 and 11, along with all other tools.

By the way, Visual Studio 11, will install for you SQL Denali Preview beta 3 release, which works just perfectly next to my usual install of SQL Express Edition with Advanced Services 2008 R2.

As I’m currently working on Soft-Shake Geneva, demo, that takes place, in October 3-4, that is meant to expose for my JAVA collegues a couple of REST Services via OData, I wanted to see, among others (e.g. evaluating how SharePoint 2010 Server works on Windows 8 Developer Preview) what Visual Studio 11 brings for developer.

After installing both Visual Studio 2010 Ultimate, as being my everyday tool, plus the full version of the Visual Studio 11 Ultimate (Express edition is being already installed as part of the Windows 8 installation kit, if you’ve chosen that respective version from the download site at Microsoft), I’ve downloaded the Windows Azure Tools for Windows 8 (available for download on CodePlex, along with documents and samples), which has been released very recently be Wade Wegner’ team (excellent work by the way), see more on Wade’s blog

Well it turns out that even if it works perfectly with Visual Studio 2010, the same is not valid for Visual Studio 11, see screenshot below. Well, meanwhile, I must say that development on Windows 8 with Visual Studio 2010 workout perfectly for me, after all Sinofski claimed multiple times at the //Build/ that all “your Windows 7 applications should work seamlessly in Windows 8”.

image

Until next time, happy coding,
c:\Marius

Installing Windows 8 Developer Preview on your everyday machine

No more than few days back, as every eager technical guy would do, I decided to give Windows 8 Developer Preview a spin, however I did not considered building a VM with it, but rather using the VHD boot capabilities available on Windows 7.

For a while now, I’ve been building my development machine using the same option, so I’ve ended up knowing the commands almost by heart. This enables me to keep my current operation system configuration while being able to try different other.  Basically, I’m having 4 OS versions running, with different installation configurations which would conflict otherwise. Another gained advantage is that while I’m building a base VHD drive, by using EXPANDABLE type disk with the PARENT option while creating a VHD, I could build on what I have already. Basically, my base installation contains already Windows 7 SP1 with all updates & drivers, so I only install specificities on each other new drive I’m building

Before starting to sum up the order of operations, a disclaimer is imposed – all information in this blog entry is provided as-is without any responsibilities from the author, that is me, if you loose your files, crash or toast your machine, or any other unwanted & undesired side effect you might encounter while following procedures presented here. With this out of the way, let’s dive into doing some stuff:

  1. Grab yourself a copy of the installation kit for Windows 8 Developer Preview from Microsoft’s download center
  2. You have the option of either using any of the procedures available on the web on how to prepare an USB drive for Windows 7 boot, or choose a more confortable solution, that works every time, and download and install the tool provided by Microsoft itself for Windows 7 USB/DVD download tool . Important is that you need a USB drive of a more than 5GB as the installation package is 5.02 GB after copying.
  3. Reboot your machine, and make sure it will boot from the USB Drive 1st, where the installation files have been copied previously. As an example I’m having a DELL Latitude, and I almost always use F12 to launch the “One-time boot menu” which enables me to choose the drive.
  4. Create and attach the VHD drive to install onto it
    Once the screen with language & keyboard selection appears, while still on that screen, press SHIFT+ F10 to launch the Command Prompt window. Type DISKPART and wait. At the command line you need to execute the following commands to create a VHD file that shall become your installation drive.
    1. CREATE VDISK FILE=”e:\VHD\W8_DP_X64.vhd” TYPE=EXPANDABLE MAXIMUM=65535
    2. ATTACH VDISK
      Some explanations:
      1. If you previously created a VHD drive for this purposes you only need to use the SELECT command by specifying only the FILE parameter
      2. The 1st command basically creates a VHD file on my E drive, while specifying that the drive should be dynamically Expandable up to the maximum of 64GB. This will allow to spare some space as opposed to FIXED drives these will be resized dynamically based on the required needs. Do make sure you have enough space prior to creating disk. Failure to do so will result in blue screen because the lack of space
      3. The 2nd command attaches the disk freshly created/selected so that the installation procedures could copy files.
  5. With the above commands executed successfully you can exit the Command prompt window and resume your installation process as usual. I must say that the procedures are almost 100% the same as with Windows 7. So choose a CUSTOM INSTALL, and then make sure you select the newly created disk. Ignore the warning about the disk which might not be used for copying files. It works just perfectly.
  6. After about 3 automatic reboots later you shall find that the boot menu has been updated too, enabling menu selection via the TILE concept, available on WIndows Phone 7 and Windows 8.

At this stage you shall have a freshly installed copy of Windows 8, stating in the bottom right that it is an evaluation version, with a long GUID identification number. Do not forget that you need to activate it to be able to start personalizing your copy of Windows 8 Developer Preview.

Hope you enjoy it as much as I do,
c:\Marius

Quick tip on troubleshooting SharePoint 2010 People Search

Once you get started with Search on SharePoint 2010 you realize that much hasn’t changed in our ways of doing things in the MOSS 2007 times (some of us still doing it, not all our clients have made the leap, despite all the bells and whistles).

Problem statement

Let’s assume that you install SharePoint 2010 (btw: here I’m talking about the Server, not the Foundation) and you might have realized that 1st time, after the configuration wizard, you end up with having a new Web Application created for you and being asked already to choose a site collection template for it. That web application usually uses the machine name so there’ll be something like http://mymachinename.

I usually skip that step and already delete that web application. The main reason is that I like to have control over what’s going on. I personally do not like using the hostnames for SharePoint applications, so I define them either in DNS (if running on Windows Server) or the HOSTS file (if I’m on a workstation such as Windows 7), so my URLs will look like http://sharepoint.local or http://mysite.sharepoint.local

So assuming you re-created a new Web Application (and give it a DNS name instead of a HOST name) and also created your new site collection and even added a Enterprise Search Center to it (only this one has the People tab, and for it you need to have the Publishing Infrastructure features activated at Site Collection level and also Top-Level Site), run a Full Crawl and suddenly you notice that even though you have lots of pages in the regular site search (or the “All Sites” tab), you have no results in the People tab.

So start investigating what is going on, by looking at crawl logs to see if any People have been crawled. To do that you go in Central administration, then Application Management and Manage Service applications

The next step is to click on the Search Service application (if you used the Configuration Wizard the name will be just like bellow, however if you created a new Search Service application and given a different name, make sure you locate that one, what is important though – to be Configured and Started).

Once clicked on it (or choose the Manage button in the Ribbon) you will notice the very familiar interface as with MOSS 2007 (we will focus on Content Sources and Scopes).

Click on “Crawl Log” in the left side and notice whether there have been any Errors or Warning messages.

It is obvious that something went wrong and clicking on the Top-level Errors or Errors, gets you to next screen where you can realize that the URL is wrong. This is your clue that in the Content Source identified by “Local SharePoint Sites” you must update the URLs.

The thing is that during creation of the web application, right after the Configuration wizard, SharePoint 2010 also added the URL for crawling in the “Local SharePoint Sites” shared Search Scope (highlighted in next screen).

How to fix it

If it happens that you do not re-create the Web application to match the URL you won’t be able to Crawl the People search, as that must be added manually (my last entry in the same screen above, shows the modified URl specific to People search sps3://SharePoint.sh, where sharepoint.sh is my new path and SPS3 it what identifies the People search and not regular pages/sites search).

Now you must run the Full Crawl on the Content Source just updated (or wait for the next automatic updated, if you did established the Schedule, or did you not??)

Hope it helps others on the investigation path,
C. Marius


Share this post :

SharePoint 2010 Enterprise Search Center quirks

If you have created a Search Center with Tabs (you  know, that one with 2 tabs that allow you to also perform People Search?) in SharePoint 2007 under a Team Site top-level site, most likely you’ve been able to experience the dreaded exception, followed by and even worse situation where the site has been created, but is inaccessible, whatsoever.

So in conclusion operation failed, and you are left with only one option: To delete that freshly created site before being able to reuse that same URL path again.

Explanation is simple (and not very well documented also): In order to use the Search Center with Tabs you need to activate the “Publishing infrastructure”.  Remember, the 2 different “types” of sites, also known as “Collaboration sites” vs. “Publishing sites”. In other words you need to activate 2 features (please note that pictures below are those available in SharePoint 2010), one at Site Collection level and the other one at Site level, as follows:

1. Open to Top-Level site, go into Site Settings and (attention) under “Site Collection Administration” choose Site Collection features. On the list find the “SharePoint Server Publishing Infrastructure”. Be aware that activating it can sometime lead to unpredictable results, particularly on the sites with highly customized default master page. Now assuming this is successful move to step 2.

2. On the same Site Settings page at the level of the top-level site, this time use the “Site Features” (only for the current site, not all the site collection) and activate the feature “….”. Once this is done, you can go create your “Search Center with Tabs”.

Now, for some questions we feel would seem reasonable:

1. Why isn’t the “Search Center with Tabs” site template hidden by default as part of the Site definition?  (In a site definition it is possible very easy to have a “VisibilityFeatureDependency” that would hide a particular site template unless that feature, whose Id is specified is not activated before)!

2. Why isn’t a specific error part of the system that should state “Hey dude, cannot do that because…bla,bla”?

If you would have thought that this issue has been tackled in SharePoint 2010, you are in for a big surprise, because it isn’t. Actually the exception message is really simple “No can do” – or in translation “An exception has occurred, Correlation Id {bla,bla,bla}”. Indeed there is a new “Enterprise Search Center” (no longer called “Search Center with Tabs”), but is does 100% the same.

In conclusion, if you ever need to use the “Enterprise Search Center” while running a “Non-publishing site”, do make sure you activate the features mentioned above!

So, even if it is obvious for some of us, that have encountered the issue in the “old” times of MOSS 2007, it might be not that obvious for some others.  I hope it does spare some valuable time, while trying to get to the bottom of it.


Share this post :

Install SharePoint 2010 RC, Visual Studio 2010 RTM, TFS 2010 on Windows 7 x64

It looks like for the 1st time in Microsoft’s application release cycles a Release Candidate of a platform such as SharePoint 2010 RTM is easily configurable with the RTM versions of Visual Studio 2010 Ultimate, and….wait, it gets better Team Foundation Server 2010 (and not in Basic Mode).

There is not much to say here, as it all went very smoothly.

I started off by installing Visual Studio 2010 Ultimate via the Web installer (i couldn’t make it via the downloaded .ISO image for whatever reason, mentioned even on Microsoft Connect site). Then i installed (but NOT configured) the Team Foundation Server 2010 x64 edition).

Once all done, I’ve started off the SharePoint 2010 RC (not the Foundation, but the full version of the SharePoint platform) and wait for it to finish.

Note that you do NOT need to install the Geneva Framework anymore neither the Sync Framework, nor the Silverlight 4 tools. I’ve just installed the MS Chart Framework for .NET 3.5. SP1.

Those being said, i now have a fully integrated environment for building my Silverlight 4 for SharePoint 2010, in one environment. So i shall better get down to it…

Until next time, happy SharePointin’,
C. Marius

Ling for Xml and Silverlight 4 beta

If you went through the trouble of setting up a development environment with Visual Studio 2010 Beta 2 and Silverlight 4 Tools for Visual Studio 2010 Beta 2 you should probably know that the installation of will not copy correctly one of the most important assemblies for Linq to XML, the System.Xml.Linq.

Also, trying to add it via project References will do no good either as it is not present there either. But you do find that assembly in <System Drive>:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client. (For X86 installations do change to the Program Files.

One more thing, if you are eager to try Visual Studio 2010 RC1 that Microsoft has been publishing not so long ago, you should know that Silverlight 4 is not supported in this release. At the same time it looks like is more and more difficult to get your hands on the Beta 2 version of Visual Studio 2010, so if you have one around, make sure you don’t delete it.

Hope it helps,
C. Marius

Installing SharePoint 2010 RC1 on Windows 7 x64 – pre-requirements have slightly changed

Not later than 2 weeks back I’ve been invited to perform some reviewing on an upcoming book for Packt publishing related to integrating Silverlight 4 and SharePoint 2010. Some months back using tips on the web i prepared my W7 x64 as development machine benefiting from VHD boot under Windows 7 to avoid messing up my physical installation with all the betas and RCs circulating around.

I do have that already couple of differential VHDs on my development machine, containing various configurations. Nowadays, after releasing Visual Studio 2010 RC1 it is hard to find any version of Visual Studio 2010 Beta 2, but i did kept close a copy of a DVD i received back at the Tech Days in Paris. The reason I need to use Visual Studio 2010 Beta 2 instead of RC1 is because support for Silverlight 4 is not included! Very important for my current situation!

Now, capitalizing on that experience, along with the fact that i also received a RC1 version of the SharePoint 2010 i set for creating a new differential VHD from my baseline create previously.

Microsoft has made a good job describing finally on TechNet the requirements, you only have to go and grab them on TechNet site. Obviously launching install still throws the same exception about failing package. Now the trick is that in Program Files (x86) one folder will be created where the installation files are extracted

So, before installing, make sure you:

1. Go under Files/Setup/ and add this line in config.xml <Setting Id="AllowWindowsClientInstall" Value="True"/>. When saving, Windows 7 will most probably request that you save it somewhere else, e.g under My Documents folder, unless you are Administrator. Just make sure overwrite the original file with the version containing your changes. Here is how my configuration file looks like.

2. Install pre-requisites, one by one:

  • Microsoft "Geneva" Framework (http://go.microsoft.com/fwlink/?LinkID=165752)
  • Microsoft Sync Framework v1.0 (http://go.microsoft.com/fwlink/?LinkID=141237&clcid=0×409)
  • Microsoft Filter Pack 2.0 (http://go.microsoft.com/fwlink/?LinkId=166504 or C:\Program Files (x86)\MSECache\oserver2010\PrerequisiteInstallerFiles\FilterPack)
  • Microsoft Chart Controls for Microsoft .NET Framework 3.5 (http://go.microsoft.com/fwlink/?LinkID=141512)
  • Microsoft SQL Server 2008 (i use Express Edition always on my development machine). In this particular case, where i needed to deal with .NET 4.0, i choose to install already the version that has support for .NET 4.0 Beta 2 (use SHAREPOINT as the name of the instance, because otherwise SharePoint 2010 will ignore it and create a new instance during setup). You can find it here SQLEXPR x64 Executable with .Net 4 Support. This will get you 2 benefits: speed up installation of SP2010 (especially that when choosing “Standalone” install it will require and install SQL 2008 Express – you will see later why i choose standalone) and avoid you to install many cumulative package updates which are really a pain. Also very important is that under Windows 7 do add the “Administrators group” already during installing to the SQL Administrators group. Also make sure that the account used for Installing and Configuring is already in the Administrators group of the local machine.
  • Obviously you don’t need PowerShell 2.0 CTP3 as Windows 7 already comes with it. Don’t try to download and install the latest release of Windows Management Framework (that contains both PowerShell 2.0, BITS and WINRM), neither of the available packages are good for Windows 7 and will NOT work and believe me SHarePoint 2010 RC1 will function just perfect without it.

You’re done, now you can start installation of SharePoint 2010 RC1 X64 (or build 14.0.4730.1010). Navigate under the same folder under Program Files (x86)/MSECache/oserver2010 and run setup.exe. Next screen shall ask for you key (i assume you have that somewhere handy).

Go on, type it in or copy it, and after validation you shall be presented with the regular screen, you must be probably familiar with from SharePoint 2007. Now this a non-turning point because depending on what you’ve selected you’ll end-up with one useless installation or….not.

The trick here is that if you choose “”Server Farm” instead of “Standalone”, you will get a warning (see bellow) and then, after all setup is finalized and Configuration Wizard starts, UNLESS you are connected to a Active Directory Domain and use a domain account (but rather a Local account – i always create various local accounts, to use best-practices, such as SPService, SPSearch, SPCrawl, etc.), you will end-up with the next error, forbidding you to continue. That’s really ugly, as you either uninstall, and choose the “Standalone” option next time, which of course, only works with MS SQL Express that gets installed behind the scenes for you during setup (and now you see why is good to install it by yourself any way you want it) or add your machine to a Windows Domain so you could use a Domain account.

Now, once this is passed, the rest should be fine. One more tip, try running setup using the Administrator account (or at least during Configuration wizard)! I had a couple of times unexpected failures of the wizard which I could only overcome by running as Administrator.

Provided that everything went fine with the installation, you shall see the Configuration Wizard screen after installation!

However, as soon as it start (while executing initializing Task 2 charged with Creating configuration database, among others) you’ll receive un ugly exception!

Looking in the log file somewhere an exception is logged about an assembly that an assembly is missing called “Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”.

After some research on this assembly, I was already suspecting that the Geneva framework has something to do with it., i found that this assembly is has something to do with Claims in the Windows Identity Foundation. This got me thinking that Microsoft released not long ago the Microsoft Windows Identity Foundation, already part of the Windows 2008 R2! So, I proceed in downloading and installing this package from Microsoft’s Download Center. Make sure you choose Windows6.1-KB974405-x64.msu. Installation is quick and smooth, and after a new attempt, what do you know, it works like a charm (even if it takes its time).

 

So here it is, now you have a brand new fresh installation of SharePoint 2010 RC1 on your Windows 7, just like mine. Next time i shall write about integrating Silverlight 4 RIA Services with SharePoint 2010 to “light-up your SharePoint” as some articles keep claiming.

Until next time, happy SharePointing’,

C. Marius