Fixing web.config for Windows 2008 Server Web Applications
Posted by Johan Cyprich on 11 Jul 2008 | Tagged as: How To
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:
- 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"/>
–> - 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" />
–> - 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.
| Related posts: | |
|
|
Share this post:
Follow Me:
Did you find this post interesting and useful? You can keep up to date on this blog by subscribing to my RSS feed, or you can have new posts sent to you by e-mail. You can also follow me on Twitter.
No Comments »
Tweet This Post!















