locked
Converted ASP.net 4.0 site to 4.5 but some files still remains as 4.0 are they correct? RRS feed

  • Question

  • User1570265326 posted

    Converted ASP.net 4.0 site to 4.5 but some files still remains as 4.0 are they correct ?

    Used visual studio 2012

    Here my config.xml. Do you see anything incorrect ? System.web , system.design, system.windows.fomrs still 4.0 ?

    When publishing i am disabling debug as false. Also thrust level what does it do ? Should i remove it ?

    <?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>



    Wednesday, February 27, 2013 7:16 AM

Answers

  • User-166373564 posted

    Hi CeOfFuture

    CeOfFuture

    Converted ASP.net 4.0 site to 4.5 but some files still remains as 4.0 are they correct ?

    One of the first things you’ll notice about .NET 4.5 the version number (4.0.30319) is the same as .NET 4, this is the practice used by other in-place updates. In other word, .NET 4.5 is a update package of .NET 4.0. I think it is ok that some file still remains as 4.0 version when you convert .net 4.0 to .net 4.5.

    If there is anything wrong, please let me know.

    hope it helps you,

    With regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 6, 2013 4:09 AM

All replies

  • User1196771204 posted

    hi there,

    leaving the trust level to Full will present problems (if in case your host does not support Full Trust mode). I would suggest you to change it to the medium mode.

    If there is any error, would you please paste the error message here? Thanks heaps! 

    Thursday, February 28, 2013 3:04 AM
  • User1196771204 posted

    hi there,

    leaving the trust level to Full will present problems (if in case your host does not support Full Trust mode). I would suggest you to change it to the medium mode.

    If there is any error, would you please paste the error message here? Thanks heaps! 

    Thursday, February 28, 2013 3:05 AM
  • User1985864055 posted

    The appropriate trust level depends on the destination environment.  If you are deploying to Windows Azure Web Sites, you should leave it set to full trust.  Many hosting providers will run your site in medium trust, and if your destination environment does that, setting medium trust in Web.config allows you to catch errors that otherwise you wouldn't find until you deploy.  See this tutorial:

    http://www.asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-deploying-to-iis-as-a-test-environment-5-of-12

     

    Thursday, February 28, 2013 11:38 AM
  • User1570265326 posted

    hi there,

    leaving the trust level to Full will present problems (if in case your host does not support Full Trust mode). I would suggest you to change it to the medium mode.

    If there is any error, would you please paste the error message here? Thanks heaps! 

    hi thanks for the answer. my host belongs to me. it is dedicated server.

    any other suggestions ?

    Friday, March 1, 2013 4:11 AM
  • User1570265326 posted

    The appropriate trust level depends on the destination environment.  If you are deploying to Windows Azure Web Sites, you should leave it set to full trust.  Many hosting providers will run your site in medium trust, and if your destination environment does that, setting medium trust in Web.config allows you to catch errors that otherwise you wouldn't find until you deploy.  See this tutorial:

    http://www.asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-deploying-to-iis-as-a-test-environment-5-of-12

     

    thanks for the answer. it is windows server 2008 r2 web edition - dedicated server belongs to me

    Friday, March 1, 2013 4:12 AM
  • User-166373564 posted

    Hi CeOfFuture

    CeOfFuture

    Converted ASP.net 4.0 site to 4.5 but some files still remains as 4.0 are they correct ?

    One of the first things you’ll notice about .NET 4.5 the version number (4.0.30319) is the same as .NET 4, this is the practice used by other in-place updates. In other word, .NET 4.5 is a update package of .NET 4.0. I think it is ok that some file still remains as 4.0 version when you convert .net 4.0 to .net 4.5.

    If there is anything wrong, please let me know.

    hope it helps you,

    With regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 6, 2013 4:09 AM