cyprich.com

Occasionally Relevant Insights from a Software Builder

By

Fixing web.config for Windows 2008 Server Web Applications

A web site created with Visual Web Developer 2008 Express Edition will not work in Windows 2008 Server. The web.config file needs to be modified in order for the web site to run correctly.

For an ASP.NET Web Site (.NET 3.5), make the following changes:

  1. In <configSections>, add comments around scriptResourceHandler:

    <!–
    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
    –>

  2. Again, in <configSections> in the scriptResourceHandler section, place comments around jsonSerialization, profileService, and authenticationService:

    <!–
    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
    –>

  3. In <system.web> in <httpModules>, place comment around ScriptModule:

    <!–
    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    –>

The web.config file will now work in Windows 2008 Server. You can download a fixed web.config file and replace the old file when you create a new web application.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>