Showing posts with label SharePoint 2010. Show all posts
Showing posts with label SharePoint 2010. Show all posts

Friday, 7 December 2012

Error Value: 2147942523 on Scheduled Task for Powershell


Situation: 
One of our clients where struggling with SSRS2008 R2 in SharePoint 2010 integrated mode (two server farm, both 64-bit Windows 2008 R2).
It is well known that this version SSRS 2008 R2 (v10) delivers a really bad performing webpart on the first report that is requested at the beginning of the day. For your information: The older v9 version performs much better as well as the newer version (of SSRS 2012).
However, I tried several solutions, without any luck. I found a solution on Pavel Pawlowski's blog (http://www.pawlowski.cz/2011/07/solving-issue-long-starting-report-ssrs-2008), which suggest to run a powershell script to stop/start the SSRS service, and load a report in a webclient (read more details on his post).
Problem:
I tried to run the scheduled task with the following statement:
"powershell.exe -noprofile -executionpolicy RemoteSigned -file c:\dnm\RestartSSRS.ps1"
It didn't work, it shows the following errors:
Task category: Action failed to start
Description: Task Scheduler failed to launch action “powershell.exe -noprofile -executionpolicy RemoteSigned -file c:\dnm\RestartSSRS.ps1? in instance “{46caf0b2-50df-49ad-90d6-0f4f9fd203ae}” of task “\SSRS Recycle”. Additional Data: Error Value: 2147942523.
Then I get:
Task category: Action start failed
Description: Task Scheduler failed to start instance “{46caf0b2-50df-49ad-90d6-0f4f9fd203ae}” of “\SSRS Recycle” task for user “customerdomain\Administrator” . Additional Data: Error Value: 2147942523
Solution:
I turns out that in this situation the Task Scheduler cannot fire the 64-bit version of powershell (which powershell.exe will do). You need to explicit point to the 32-bit version.
What I did was, edit the scheduled task, go to the action-tab and open the edit action window of the action.
On 'Program/script', I entered: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
On 'Add arguments (optional), I entered: -noprofile -executionpolicy RemoteSigned -file c:\myScripts\RestartSSRS.ps1

Done, that solved the "Error Value: 2147942523" problem for me.
And the solution Pavel Pawlowski gave, works also! All credits to him!

Tuesday, 16 October 2012

LINQ to SharePoint: linq query filter on multivalue lookup

Situation:
I have a SharePoint Foundation 2010 environment with a document library. One of the metadata on the documents is a multivalue lookup to a category list.
I used SPMetal to create entity classes for easy usage of linq to the different lists and libraries inside the SharePoint site.
Problem:
Inside a visual web part, I was trying to execute a linq query on the document library, filtering on a given category.
Example code:

QualityDataContext dc = new QualityDataContext(SPContext.Current.Web.Url);
// some other steps made
var mySelectedCat = dc.MyCategories.OrderBy(p => p.Title).Where(p => p.id == "CategoryOfInterestID")

var docs = dc.MyDocLib.OrderBy(p => p.Title).Where(p => p.Categories.Contains(mySelectedCat));

This goes wrong because in this situation linq is messing up with the "p.Categories" en the entity "mySelectedCat"

Solution:
I have searched a lot, without getting a right, easy solution. Some mentioned to use the 'old' "SPWeb, SPList, SPQuery and so on"-way. Others where trying to believe you that the sample above is working.
Sorry folks, it's not. The problem is that querying on the multivalue lookup just works after the data has been retrieved. So I uses the ToList() method to the 'docs' part, just before filtering. For performance reasons, I first get the whole list (I just needed the whole list) and then do the filtering on the moment I needed it.
So this results in the following piece of code that I am using to fill a tree view, grouped on main category and sub category with links to documents.
Note the 'ToList()' I am using, twice just straight in the beginning of the using section. This is doing the trick.

using (QualityDataContext dc = new QualityDataContext(SPContext.Current.Web.Url))
{
 var cats = dc.MyCategories.OrderBy(p => p.Title).ToList();
 var docs = dc.MyDocuments.OrderBy(p => p.Title).ToList();

 SPTreeView tv = new SPTreeView();

 var mainCat = cats.OrderBy(p => p.Category).GroupBy(p => p.Category);
 
 // Step through the main categories
 foreach (var item in mainCat)
 {
  TreeNode catNode = new TreeNode{ Text = item.Key, Value = item.Key };
  
  var subCats = cats.OrderBy(p => p.Title).Where(p => p.Category == item.Key);

  // Step through the sub categories
  foreach (var subCat in subCats)
  {
   TreeNode subCatnode = new TreeNode { Text = subCat.Title, Value = subCat.Id.ToString() };
   var subdocs = docs.Where(p => p.Categories.Contains(subCat));

   if (subdocs.Count() > 0)
   {
    foreach (var doc in subdocs)
    {
     string docUrl = doc.Path + "/" + doc.Naam;
     subCatnode.ChildNodes.Add(new TreeNode { Text = doc.Naam, ToolTip = doc.Title, NavigateUrl = docUrl, Target = "_blank" });
    }
    subCatnode.Collapse();
    catNode.ChildNodes.Add(subCatnode);
   }
  }
  tv.Nodes.Add(catNode);
 }
 this.Controls.Add(tv);

Tuesday, 21 August 2012

Attachments in SharePoint List Item ARE searchable

Today I got a question by phone of one this blog-followers (hi Erwin!). His question was if attachments on SharePoint list items are searchable. I had to confess that I've never had this question before. A first quick search on the internet gave the answer: no!
But, that isn't the truth. I just search a bit around, because I was curious if that was really true. I found that list attachments are indexed in SharePoint search. And because of that, searchable!
The trick, or if you like the problem, is the presentation of the results by SharePoint. The results are not pointing to the attachment itself, but to the list item that contains that attachment. But in the description of the search result, you can see the words from the attachment that you searched for. This is a bit disappointing because the search result would be confusing and useless if the list item has multiple attachments. The user won’t know which attachment contains the words he searched for.
(thanks to Saji Viswambharan)

Tuesday, 7 August 2012

SharePoint designer workflow not updated

Today, I ran into another big SharePoint mystery (if you like mysteries, join the SharePoint world ;) ). A couple of weeks ago, I wrote a workflow in SharePoint designer (SPD) on a SharePoint Foundation environment. So far, so good.
Problem:
Today, I had to update/fix the workflow because I forgot a little step. And guess what, it didn't work. The updates on the workflow were not applied. Although a new version of the workflow was present on the site, the changed were not. Rebooting the entire SharePoint machine didn't solve this. Arghhhhhh..... But lucky me, after some search, I noticed that I was not the only one...
Solution:
It seems that SPD (sometimes = randomly I guess) forgot to empty his own application cache. A republish of a workflow is then done with the cached (=old) info. This is due to a mismatch between the server's activity and the SPD client's cached activity. So:
  1. Close SPD.
  2. Open “My Computer”.
  3. Go to %System Drive%\Documents and Settings\%user%\Local Settings\Application Data\Microsoft\WebSiteCache (If you are running Vista, that path is different - look for %System Drive%\Users\%user%\AppData\Local\Microsoft\WebSiteCache).
  4. Go to a directory that looks similar to the name of the website you were connecting to. (Alternatively, you can just delete all these directories and everything should work when you boot SPD).
  5. Delete the assembly with the name similar to the one you are changing.
  6. Boot SPD.
  7. You can now work with your updated activity.
Good luck and have fun!

Tuesday, 10 July 2012

Problems with SPUtility.SendEmail in custom timer job

Last week I ran into a strange problem. I wrote a custom timer job which will send reminder emails to employees who haven't finished their task after a certain time.
Problem(s):
Sending emails is easy, by using the SPUtility.SendEmail function. Well, at least it should be easy. There are a lot of code samples, so search around for some if you need it. However, again I ran into a SharePoint problem. This function returns a boolean value and gave me 'false' all the time. I tried to use the ordinary mail method of System.Net.Mail. There I got an error about "Message rejected as spam by Content Filtering". Some research of the IT department on Exchange did not solve this problem.
Well, I went back to the SPUtility.SendEmail function. I turned out that using the StringDictionary gave some problems as well as using HTML tags. Using plane text and one of the other overloads that doesn't use the StringDictionary results in a successful send action. But I needed a formatted message (sending some links).
The LOG files gave some extra information on the 'false' action. And yes, it shows why it didn't send the messages: 550 5.7.1 Message rejected as spam by Content Filtering.
Solution:
The solution I found (here) was relatively easy. Bypassing the content filter for a specific email address (or even sender domain). To do this, you need to resort to the Exchange shell (EMS) to manage it.

  1. Click on Start > All Programs > Microsoft Exchange 20xx > Exchange Management Shell. Note, this works for at least Exchange 2007 and 2010 versions.
  2. Create the bypass for the 'from' email address you use when sending the email from a timer job:
    Set-ContentFilterConfig -BypassedSenders somebody1@mycompany.com, somebody2@mycompany.com
Note: You need to realize that spammers can spoof the 'from' address and this would allow spam to get thru.
So, after all, it was not really a SharePoint problem, but an Exchange 'problem'.

Thursday, 5 July 2012

Value does not fall within the expected range

Currently working on SharePoint and yep, running into strange problems and errors. A better name will be ShareProblems or SharePointless. However, just kidding a bit. But seriously, I run into the following situation:
Situation:
Running a webservice outside SharePoint which will receive data from a webform (on another server) in JSON format. The received data will be saved in a SharePoint list by using the client side object model. So far so good. The initial test where run by the administrator account (used for the installation and configuration of SharePoint). It worked fine. Because I have to run a workflow on 'new item created' on the SharePoint list, I needed a 'normal' account. The admin and service accounts are not allowed to start workflows. So, new AD account defined, gave the appropriate rights and voila... uh, not really.
Problem: 
Part of the code:

ListItemCreationInformation lici = new ListItemCreationInformation();
ListItem item = list.AddItem(lici);

item["Title"] = HttpUtility.UrlDecode(name);
item["Category"] = (categorie == "0") ? 15 : int.Parse(categorie);
item["Street"] = HttpUtility.UrlDecode(street);
item["Postal_x0020_Code"] = HttpUtility.UrlDecode(postalcode);

item.Update();
_clientContext.ExecuteQuery();


I got the return message: Value does not fall within the expected range.
The callstack was something like this:

at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse() at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery() at DnmWebServices.MessagingService.SendRtvRequest(String name, String category, String street, String postalcode) in c:\inetpub\wwwroot\DnmWebServices\App_Code\MessagingService.cs:line 128
Line 128 in my case points to the _clientContext.ExecuteQuery.
Solution(s):
It seems there can be several causes.
1). Use of invalid field name. You need to use the internal field name! However, that was not the case in my situation.
2). Change the List View Lookup Threshold value of the web application. Default value is 8, I changed it to 20 and big surprise: it worked! Thanks to this post.
Note: My item has some lookup fields some of which some have more than 8 items.
Little conclusion: So it seems that when using (one of) the system admin accounts, this list view lookup threshold is ignored in one way. By using non-system admin accounts, it can be a show stopper.
Steps to edit this value:

  • Go to Central Administration > Application Management > Manage web applications
  • Select the appropriate web application (in my case the SharePoint - 80)
  • In the ribbon bar, select General Settings > Resourse Throttling
  • Search for the List View Lookup Threshold and change the value to 20.

Friday, 15 June 2012

IE9 and SharePoint 2010: Memory Leak!

Today, I ran into a really stupid issue. It seems that IE9 has a memory leak when using SharePoint 2010. On each refresh of a SharePoint 2010 page, the amount of used RAM is increasing by approx. 5 MB.
I found a lot of talking about it, but no solution yet.
Seems that Microsoft doesn't work on that, well at least don't let know us.
By the way, I am running Win7 x64.
Absolutely stupid. You cannot expect end-users to restart their IE9 browser a couple of times during the day. Even more ridiculous is the fact that IE8 doesn't have that issue.

Possible solution: deactivation of the ActiveX NameCtrl. Let's try that, or use another browser.

Monday, 27 June 2011

Raise (custom) event after closing jQuery popBox

Recently I started to use the jQuery plugin popBox (http://plugins.jquery.com/project/popBox). This plugin provides a simple to use popup textarea extension for textboxes. The nice thing is that it works on hidden textboxes as well.

For my hour registration form I have some hidden textboxes to keep the form a bit clean. The form supplies textboxes for each day (see figure).
So for each day you can add hours, comment en log-info. The last two fields are hidden. To edit the comment and/or log-info you just press on the corresponding image.
Because these fields are invisible, you want to have some kind of indication if some text has been entered already or not. So I want to change the 'button'image if some text has been entered.
Raising an event seems to be a hard job, because you don't really access the (hidden) textbox, so their events are not raised. After some search and trial and error I found a solution.
First of all, let me show you how I attached the jQuery popBox plugin to my hidden comment and log-textboxes (see instructions at http://plugins.jquery.com/project/popBox). The hidden textboxes where called like txtNewMonComment, txtNewMonLog, txtNewTueComment etc.

1. I applied the popBox to all textboxes with class set to 'txtDailyComment':
$(document).ready(function () {
 //attach popBox jQuery plugin to all textboxes with class=txtDailyComment.
 $('.txtDailyComment').popBox();
});
2. The images that simulates a button are configured like this:
<img alt="Comment" src="/hrt/_layouts/images/DNM.WP.HourRegistrationGeneralForm/message_add.png"  onclick='SetTextboxFocus($(this));' id="btnNewMonComment" />
3. I wrote the SetTextboxFocus function to show the content of the corresponding hidden textbox:
function SetTextboxFocus(button) {
 var day = button.attr("id").substring(6, 9);
 var type = button.attr("alt");
 var control = "txtNew" + day + type;
 $("input[name=" + control + "]").focus();
}
So far is just like the instructions on the popBox plugin page.
4. The customization starts here and is quit simple. I wrote a function that I want to fire after closing the popBox. You can do whatever you want in this function. For demo reason I just show an alert:
function AfterTextboxUpdate() {
 alert('popBox is closed');
}
5. The popBox plugin supports option parameters. So I just add one of myself. I changed the popBox attach as written in step 1 as follows:
$(document).ready(function () {
 //attach popBox jQuery plugin to all textboxes with class=txtDailyComment.
 $('.txtDailyComment').popBox({ onclose: function () { AfterTextboxUpdate(); } });
});
6. The last step is to edit the popBox1.3.0.js file. Find the part where blur function is fired and add "options.onclose();" inside the if-section:
popBoxContainer.children().blur(function () {

 if (change) {

  $(this).parent().hide();
  $(this).parent().prev().hide();
  $(this).parent().prev().prev().val($(this).val().replace(/\n/g, options.newlineString));
  options.onclose();
 }
});
That's it. When you close the popBox, the AfterTextboxUpdate function will be fired.


Hope this helps you to get even more about this great jQuery plugin.

Tuesday, 22 March 2011

The query uses unsupported elements

I am using SPMetal for creating partial classes for accessing my SharePoint lists by code.
Today I was trying to run a Linq query in LinqPad on a SharePoint list (see here how to use LinqPad on SharePoint data). See query:
var q = from w in WorkItems
  where w.ShortUserID == "rob"
  where (((DateTime)(w.WorkDate)) >= firstDay 
     && ((DateTime)(w.WorkDate)) <= firstDay.AddDays(6))
  select new {w.Title, w.WorkDate, w.Hours, sprint = w.SprintItem.Title};
q.Dump();
Well, it's just an ordinary Linq query, but as always with SharePoint related programming, nothing goes well the first time. I got the following error message:
The query uses unsupported elements, such as references to more than one list, or the projection of a complete entity by using EntityRef/EntitySet
It has something to do with the 'sprint' information I needed. The 'SprintItem' is a property (Type of SprintItem object) of the WorkItem class. Somehow this will fail.
An explanation given by Paul Beck (see his blog):
ToList() method forces immediate query evaluation and returns the generic that contains the query result. As described in the MSDN article LINQ can't convert the LINQ to SharePoint into a CAML query so by using the ToList() method, the query is broken into 2 stages. This will apply to queries that use JOINS, UNIONS, and various other LINQ operators as described in the MSDN Unsupported LINQ queries article.
In his article he relates this problem with 'join'. However, I didn't use this keyword. Nevertheless his solution worked, I needed to put 'ToList()' right behind 'WorkItems' and the problem is solved. So the code will now looks like:
var q = from w in WorkItems.ToList()
  where w.ShortUserID == "rob"
  where (((DateTime)(w.WorkDate)) >= firstDay 
      && ((DateTime)(w.WorkDate)) <= firstDay.AddDays(6))
  select new {w.Title, w.WorkDate, w.Hours, sprint = w.SprintItem.Title};
q.Dump();

Thursday, 10 March 2011

LinqPad on SharePoint data

Linq to SharePoint is great! The SPMetal.exe is really easy to use (see here how to use it).
But I was struggling a bit to get the right Linq queries. So I thought, well let's use LinqPad. I ran into the following error message:
PropertyOrFieldNotInitializedException: The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
I searched for a solution, but I didn't find one. Today I figured out how to use LinqPad to query on SharePoint data, without facing these security-IIS-related issues.
On CodePlex you can find the LinqPad Data Context Driver for SharePoint created by a guy named 'theiwaz'. Creating a new connection in LinqPad, using this driver did the trick. Read the documentation how to install and setup the configuration (very easy!).

In my situation, I ran into a small problem. The documentation shows a screenshot with a sample code, using "C# Expression" a the language.
When I tried that, it failed. I got the following message:
String was not recognized as a valid Boolean
 Changing the language to "C# Statement(s)" did the trick for me. I only need to rewrite the code a little bit. But that's actually a great advantage, because it now looks like the code as I will use inside my VS2010 project.
var q = from prod in Products
    where prod.Customer.Title == "DNM"
    select  prod.Title;

q.Dump(1);

Friday, 4 March 2011

SPException: Field type is not installed properly

During my trial to create a custom cascade filtering lookup field, I run into the following exception:
SPException: Field type is not installed properly
There are several possible situations that can cause this error. E.g. using the optional field SPQuery in the fldtype_.xml is not allowed for custom field (see also http://msdn.microsoft.com/en-us/library/aa544201.aspx).
However, this was not my issue. I made a little (stupid?) mistake in the xml file. The field FieldTypeClass should show the full class name (including the entire namespace) as well as the full assembly name (I forgot the class-part, as shown in bold). So it should look like this:
<Field Name="FieldTypeClass">Dnm.SP2010.CF.AutoFilteredLookup.AutoFilteredLookupField, Dnm.SP2010.CF.AutoFilteredLookup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93ec60d3306981cd</Field>

Wednesday, 2 March 2011

customerrors mode off not working on SharePoint 2010

During the developing of a custom field, I faced some errors, but the didn't work.
After some search, it seems that you have to do this trick on three locations. SharePoint 2010 has web.config files on the following locations:
  • C:\inetpub\wwwroot\wss\VirtualDirectories\80\
  • C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\
  • C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS
On all these locations you can find a web.config file.
Change customerrors to:
<customErrors mode="Off" />
and the SaveMode tag (if available) to:
<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="true">
as well as the compilation tag to:

<compilation batch="false" debug="true" optimizeCompilations="true">
This did the trick for me

Thursday, 9 December 2010

Access denied SharePoint Farm account

Problem:
Today I ran into a strange problem. I was working on the Central Administration (CA) of SharePoint Server 2010. I was planning to manage some system settings (manage servers in this farm). To my surprise I got a 'Access Denied' message.
Solution:
After searching around for a while, some reboots, changing authorization settings in the web.config I found the solution. I made a bookmark inside IE to navigate to the CA. I started just IE and clicked on this bookmark. And thats not good!
You need to run Internet Explorer explicit in administrator mode to get full access to all options inside SharePoint's CA.
It seems that is has something to do with UAC.

Thursday, 21 October 2010

Cannot connect to database master at SQL server

During installation of SharePoint 2010 the Configuration Wizard could not connect to the SQL Server database:
Cannot connect to database master at SQL server at SERVERNAME. The database might not exist, or the current user does not have permission to connect to it.
Several blogs where dealing with the permissions, which I checked, but they were well set. The actual problem was the TCP/IP setting of SQLServer. The TCP/IP protocol for the SQL Server was disabled (default setting on installation). Enabling this setting solved the problem.
Enabling can be done using the Sql Server Configuration Manager. Go to SQL Server Network Configuration > Protocols for MSSQLSERVER (or the named instance name you are using) en check the TCP/IP protocol status. This should be 'Enabled'.

So, if you are running into this error, check the user accounts settings as well as the TCP/IP settings of the SQL Server.

Update (23 August 2012): I just add an extra addition: Make sure that SQL server is listening on port 1433 (Thanks to Suolon)

Monday, 8 March 2010

Release date SharePoint 2010 and Office 2010

Last Saturday, Microsoft announced the release date of both SharePoint 2010 en Microsoft Office 2010. Arpan Shah wrote:
"Today, we officially announced that May 12th, 2010, is the launch date for SharePoint 2010 & Office 2010. In addition, we announced our intent to RTM (Release to Manufacturing) this April 2010."

For consumers, Office 2010 will be available online and on retail shelves this June.
You can read more at http://blogs.technet.com/office2010/archive/2010/03/04/get-office-today-or-tomorrow.aspx and http://sharepoint.microsoft.com/businessproductivity/proof/pages/2010-launch-events.aspx

Friday, 8 January 2010

Edit Office Document from SharePoint in IE8 64 bit version

Have you ever tried to open a Word document from a SharePoint 2007 document library using Internet Explorer 8 64 bit edition? Today I tried, because I am running a 64 bit Windows 7 edition.
Guess what, next message was shown:


So I tried also to open a Word document from a SharePoint 2010 document library in IE8 x64. Of course, it doesn't work either. Only the message was a bit different:


Oh, by the way, I am using Office 2007 SP2. I didn't try it with Office 2010 (not installed yet). Maybe that will work? I guess not, but I let you know.
Thanks Microsoft! :(

Update:

I read on technet that the IE8 64 is a so called Level 2 brower. According to Microsoft, Web browser support is divided into two levels: level 1 and level 2. Although administrative tasks on SharePoint sites are optimized for level 1 browsers, SharePoint Server 2010 also provides support for other browsers that are frequently used. To ensure that you have complete access to all functionality, we recommend that you use a level 1 browser for administrative tasks.

So it seems that editing a Word document from SharePoint is administrative task. In SharePoint it is called 'contribution'... do you follow it?

Read more at Microsoft Technet:
http://technet.microsoft.com/en-us/library/cc263526%28office.14%29.aspx

Thursday, 7 January 2010

SharePoint 2010: Solution for failing step 5 of the configuration wizard

This week I was trying to install SharePoint 2010 on Windows 2008 R2 (on VMware). That was not that easy. The major problem I faced with was step 5 on the configuration wizard. All the rest went well. There are a lot of sites/blog with information about the different steps, not that hard to do.
But I got every time the following exception:

Failed to register SharePoint services. An exception of type System.ServiceProcess.TimeoutException was thrown. Additional exception information: Time out has expired and the operation has not been completed. System.ServiceProcess.TimeoutException: Time out has expired and the operation has not been completed. at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout) at Microsoft.SharePoint.Win32.SPAdvApi32.StartService(String strServiceName) at Microsoft.SharePoint.Administration.SPWindowsServiceInstance.Start() at Microsoft.SharePoint.Administration.SPWindowsServiceInstance.Provision(Boolean start) at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Provision() at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInstanceInConfigDB(Boolean provisionTheServiceInstanceToo, String serviceInstanceRegistryKeyName, Object sharepointServiceObject) at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInstances(Boolean provisionTheServiceInstancesToo, String serviceRegistryKeyName, Object sharepointServiceObject) at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServices(Boolean provisionTheServicesToo) at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.Run() at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

To overcome this problem, I tried to increase the amount of RAM from 1GB to 2GB. But that does not solved the problem. One of the other advices was to install SQL Server 2008 SP1. I was not able to install that on my version, so I skipped that part.
The solution that worked for me was removing a couple of registry keys. Removing the following keys solved the problem for me:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0 \WSS\Services\Microsoft.SharePoint. Search.Administration.SPSearchService
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0 \WSS\Services\Microsoft.SharePoint. Search.Administration.SearchService
So, finally I have a beta version of SharePoint 2010 running on a virtual machine. So time to play with it!