Using AJAX or Silverlight from within SharePoint in Webparts requires you to modify the web.config to support the technology. I don’t mention that you have to install the .NET Framework 3.5 SP1 and Silverlight to be able to use it…
Instead of changing the web.config manually (.NET Framework 3.5 AJAX und Silverlight in SharePoint registrieren von Fabian Moritz), you can use my features. They do all the necessary changes for you. The Silverlight feature requires the .Net 3.5 feature.
- Add the solution to your farm “stsadm -o addsolution -filename RH.Net35WebConfig.wsp”
- Deploy the solution “Central Administration > Operations > Solution Management”
- Activate the features on a web application “Central Administration > Application Management > Manage Web Application Features”
Uninstall the solution
After you’ve deactivated the feature(s), you might get an exception (if you have set your customErrors to Off, or visit the site from your SharePoint Server):
This exception is thrown, because the IIS does not like the empty XML Nodes:
<span class=kwrd><</span><span class=html>scripting</span><span class=kwrd>></span>
<span class=kwrd></</span><span class=html>webServices</span><span class=kwrd>></span>
<span class=kwrd></</span><span class=html>system.web.extensions</span><span class=kwrd>></span>
You can safely delete the empty nodes from your web.config.
Update 22. Aug 2009
Add section configuration/system.web/pages if it does not exist.
Download Source RH.Net3.5WebConfig-Source