Housekeeping: Enabling Server-side Scripts on ASPX Pages

By default, SharePoint disables the ability to create server-side scripts, and you need to modify the SharePoint Web application web.config file using the following instructions. If you attempt to use server-side script without modifying the web.config file, then users see the error shown in Figure 28.23 when they attempt to navigate to the page in the browser.

Figure 28.23 Code blocks are not allowed by default in ASPX pages.

image

First, you need to modify the site’s web.config, which is located on the SharePoint Web front-end server under %SystemDrive%\inetpub\wwwroot\wss\VirtualDirectories\WebApplicationID ...

Get Microsoft® SharePoint® Designer 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.