FirstServed Tech Blog - FirstServed and the Art of Server Tuning

Archive for October, 2009

Could not load file or assembly System.EnterpriseServices

Friday, October 16th, 2009

When running through what should be a simple and painless Microsoft Sharepoint installation on a Windows Server 2003 server (with IIS 6.0 pre-installed – I don’t recall if it was a virtual server or a dedicated server), I encountered the following problem:

Server Error in '/_layouts' Application.

IIS is kind enough to hide all the information about the error, so there you are, without a clue.
Maybe this can solved in the "SharePoint Central Administration"? No luck either, now it throws a similar error.
So, to resolve this issue, we first need to activate the error output in the web.config.
This is located at the following location:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\template\admin\1033\web.config

Open the file using your favourite text editor and search for the line which sets the customErrors (line 3), change it to:

<customErrors mode="RemoteOnly" />

Now you’ll be able to view the errors when browsing to your Sharepoint installation from the server itself.
This time it presents you the real problem:

Parser Error Message: Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.

So, how do we fix this missing assembly?
Open two windows explorer screens with these locations:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
C:\WINDOWS\assembly

(The .NET Framework version and Windows Path may differ depending on your installation.)

Then drag the file "System.EnterpriseServices.dll" from the Microsoft.NET\Framework\v2.0.50727 folder to the assembly folder.

Now the problem should be fixed. (It is possible you’ll have to recycle the Application Pool.)
Reload your browser windows, both the Central Administration page at port 9503 en the normal sharepoint pages at port 80 should work.

Thanks goes out to the people at forums.asp.net!

YUM update is taking ages…

Friday, October 2nd, 2009

If the good old and trustworthy CentOs image you are using is suddenly being VERY slow when performing a "yum upgrade" command, try this rule to speed things back up a bit:

yum clean all

Most likely yum is using some old cached information.

We encountered this problem when upgrading from CentOS 5.0 to 5.3.