将ASP.net 4.0网站转换为4.5,但有些文件仍为4.0,是否正确?

时间:2013-02-27 12:13:51

标签: asp.net web web-config asp.net-4.5

将ASP.net 4.0网站转换为4.5,但有些文件仍为4.0,是否正确?

二手visual studio 2012

这是我的config.xml。你看到什么不正确吗? System.web,system.design,system.windows.fomrs仍然是4.0?

发布时我禁用debug为false。还有推力等级它做什么?我应该删除吗?

<?xml version="1.0"?>
    <configuration>

      <configSections>
    <sectionGroup name="system.web">
      <section name="sanitizer" requirePermission="false"
               type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" />
    </sectionGroup>
  </configSections>

  <appSettings/>
  <connectionStrings/>

  <system.web>

    <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="60"/>
    <compilation debug="true" targetFramework="4.5">
      <assemblies>
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      </assemblies>
    </compilation>

    <trust level="Full" />

    <sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider">
      <providers>
        <add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider"></add>
      </providers>
    </sanitizer>

    <authentication mode="Windows"/>
    <customErrors mode="Off"/>
    <pages validateRequest="true" viewStateEncryptionMode="Never" enableViewStateMac="true" enableSessionState="true" controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID"/>
    <httpModules/>

  </system.web>


  <system.webServer>
    <modules runAllManagedModulesForAllRequests="false"/>
    <staticContent>
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00"/>
    </staticContent>
  </system.webServer>

  <system.web.extensions>
    <scripting>
      <scriptResourceHandler enableCompression="true" enableCaching="true"/>
    </scripting>
  </system.web.extensions>

</configuration>

1 个答案:

答案 0 :(得分:1)

这很正常。并非每个框架库都使用新版本的.NET进行增强。因此,如果没有任何内容添加到参考库,那么它将保留旧版本。