如何使用.NET 3.5 Web应用程序在.NET 4.0的Web应用程序? [英] How to use a .NET 4.0 web application within a .NET 3.5 web application?

查看:177
本文介绍了如何使用.NET 3.5 Web应用程序在.NET 4.0的Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我公司拥有内置的ASP.NET网站和面向.NET 3.5。这是太错位和大规模转换为.NET 4及时。我负责建立一个售票系统。我想这个售票系统是从主应用程序一个完全独立的应用程序。我添加了一个目录到一个名为TicketingSystem的网站,然后在IIS中我将此文件夹设置为一个应用程序,采用了面向.NET 4.0的应用程序池。我假定本申请中就不会受到它上面的应用,特别是因为它使用自己的应用程序池,但它似乎它受着不知。导航到该目录,在这我.NET 4的Web应用程序生成此错误:

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 system. I want this ticketing system to be a completely separate application from the main application. I added a directory to the website called "TicketingSystem", then in IIS I set this folder as an application, using an app pool that targets .net 4.0. I assumed this application would not be affected by the application above it, especially since it uses its own app pool, but it would seem it is being affected somehow. Navigating to this directory with my .net 4 web app in it generates this error:

我喜欢覆盖文件路径和材料的敏感信息,但表示配置文件线路的路径父应用程序的配置文件,在.NET 4的应用程序中没有配置文件。

I covered the sensitive information like file paths and stuff, but the line that says config file has a path to the parent application's config file, not the config file of the .net 4 app.

任何信息AP preciated。这难道不是可以嵌套在.NET 3.5的应用程序在.NET 4.0的应用程序?

Any information is appreciated. Is it not possible to nest a .net 4.0 app within a .net 3.5 app?

修改作为请求这里是IIS目录结构的截图。

EDIT As requested here is a screenshot of the IIS directory structure.

推荐答案

Web.config文件的继承是不幸的是没有东西可以完全关闭;具体而言,在限定在web.config顶部部分,其在web.config存在配置部分不能忽视/内的子应用程序覆盖。

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.

该解决方案被记录在这里(asp.net 4重大更改文档) ;从本质上讲,你必须将当前在顶部的应用程序成一台机器/ FrameworkVersion特定的配置文件中的值,然后包装所有(或至少大多数)的根web.config中与传承禁用位置标记。

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.

这篇关于如何使用.NET 3.5 Web应用程序在.NET 4.0的Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆