Trouble with forum inside another Web application

Author
APGvNext Sam
vNext Dev
  • Total Posts : 13240
  • Joined: 2001/05/23 00:00:00
  • Status: offline
2009/02/27 12:23:20 (permalink) Error / Issue
0

Trouble with forum inside another Web application

When you have a site with its web.config file and installed the forum under the site root, sometimes you will run into problems running the forum like:
 
System.Configuration.ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework.

 
The reason for these weird errors is mostly due to web.config inheritance - the forum inherits the settings from your own web.config file which causes conflicts with its own settings.

Also, you may experience issue like registration failures and log in failures that present as "verification failure" or with WinXP the complete inability to enter a unique user name or password.

The solution: Break the inheritance

In your site (parent) web.config, wrap the following:
<location path="."inheritInChildApplications="false"> 
 
</location>

around system.web, system.webServer, and system.codedom.

This should prevent inheritance from happening between the site and the forum.
#1

1 Reply Related Threads

    APGvNext Sam
    vNext Dev
    • Total Posts : 13240
    • Joined: 2001/05/23 00:00:00
    • Status: offline
    Re:Trouble with forum inside another Web application 2010/07/19 11:40:29 (permalink)
    0
    If the issue happens on a different level than system.web e.g. if it shows an error like the following:
     
    Section or group name system.web.extensions is already defined
     
    You will need to follow the instruction Microsoft gives in this article as this is a bug or limitation of the .NET environment (see the second response):
     
    http://connect.microsoft....ns-inheritance-problem
    post edited by Samuel - 2010/07/19 11:54:29
    #2
    Jump to:
    © 2021 APG vNext Commercial Version 5.5