15. February 2008 03:07
By default, MOSS disabled the ability to run server side scripts in your page. This means you can't have C# or VB.net Code-Blocks in your layouts or master pages like you would with a normal asp.net application.
Luckily it's an easy modification to get it working again.
Open the web.config for your site and find the <PageParserPaths> node, probably empty, and near the top of the file.
You can add a <PageParserPath> node inside there to enable server-side scripts for certain pages, and you can use wildcards.
Example:
<PageParserPaths>
<PageParserPath VirtualPath="/pages/*" CompilationMode="Always" AllowServerSideScript="true" />
</PageParserPaths>
The virtual path may start with "~/" or "/" and may end with "*" or "aspx" or "master"