I recently came across the issue where after a fresh and successful install of SharePoint Server 2007 (MOSS2007) that the Central Administration Site would give an application error upon loading for the first time.  After changing &lt;customErrors mode="Off" /&gt; in all the web.config files we are able to see the "Could not write to output file 'The directory name is invalid.'" error pointing to a folder below the WindowsMicrosoft.Net directory.  This error indicates that something is amiss with the ASPNET user account and it doesn't have permissions to write to the folders below the Microsoft.Net folder.  To solve this follow these simple steps.
<ol>
	<li>Open up Computer Management and verify that the user ASPNET exists.</li>
	<li>Navigate to the Microsoft.Net directory (typically C:WindowsMicrosoft.Net) and open up it's security properties.</li>
	<li>Add the ASPNET user under the sercurity tab and give it read/write/modify rights.</li>
	<li>Click on advanced and check the box to replace permissions on child folders.</li>
</ol>
Restart IIS and then navigate back to the Central Administration Site and it should be come right up (after a little compile time).