English 中文(简体)
如何保持清洁的ASP。 NET网络。 仅使用<系统>的新MVC3/Azure项目汇合文档?
原标题:How to keep clean ASP.NET web.config file for a new MVC3/Azure project using only <system.webServer>?

I just created a new project in MVC3 using EF4 code first deployed on Windows Azure. I want to keep my "web.config" file as clean as possible because it s a little complicated to understand all tags it contains.

页: 1

The first is for IIS6 and the second for IIS7+ I do not need backward compatibility so want to delete the first.

我将第一部分变成了第二部分,但我无法找到如何改变这些部分:

<system.web>
  <authentication mode="None" />
  <compilation debug="true" targetFramework="4.0">
    <assemblies>
      <add assembly="System.Web.Helpers, Version=2.0.0.0, Culture=neutral />
      <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral />
      <add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral />
      <add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral />
    </assemblies>
  </compilation>
  <pages validateRequest="false">
    <namespaces>
      <add namespace="System.Web.Helpers" />
      <add namespace="System.Web.Mvc" />
      <add namespace="System.Web.Mvc.Ajax" />
      <add namespace="System.Web.Mvc.Html" />
      <add namespace="System.Web.Routing" />
      <add namespace="System.Web.WebPages" />
    </namespaces>
  </pages>
</system.web>

如何这样做,我可以删除已折旧的<代码><system.web>?。

最佳回答

并非所有要素都作了解释。 两个最重要的章节是:www.web/Handlers,已移到系统/webServer/handlers和/system.web/ 现在是制度。 网址:www.erver/modules。 你没有必要再触及上述组合,因为系统内的要素仍然是该系统的一部分。 甚至在IIS7中的网络内容。 你们在变化之后是否尝试过你的网站?

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签