How to use a .NET 4.0 web application within a .NET 3.5 web application?

前端 未结 6 813
既然无缘
既然无缘 2021-02-08 14:57

My company has a website built in ASP.NET and targets .NET 3.5. It is too mangled and massive to be converted to .NET 4 in a timely manner. I am tasked with building a ticketing

6条回答
  •  无人及你
    2021-02-08 15:14

    Web.config inheritance is unfortunately not something you can turn off completely; Specifically, the top section in the web.config that defines which config sections exist in the web.config cannot be ignored/overridden inside a child application.

    The solution is documented here(asp.net 4 breaking changes documentation); Essentially you have to move the values that are currently in the top application up into a machine/FrameworkVersion specific config file and then wrap all(or at least, most) of your root web.config in a location tag with inheritence disabled.

提交回复
热议问题