locked
when i publish my project online than get this error plz find RRS feed

  • Question

  • User-1094029593 posted

    error 

    (Filename: \\?\C:\Inetpub\vhosts\solfrolic.com\httpdocs\web.config Line number: 20 Error: Config section 'system.web/compilation' already defined. Sections must only appear once per config file)

    <?xml version="1.0" encoding="utf-8"?>
    <!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    -->
    <configuration>
    <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </configSections>
    <connectionStrings>
    <!--<add name="DefaultConnection" connectionString="Data Source=ADMIN-PC\SQLEXPRESS;Initial Catalog=solsports;Integrated Security=True" providerName="System.Data.SqlClient" />-->
    <add name="DefaultConnection" connectionString="Data Source=10.50.0.102;Integrated Security=False;User ID=sol;Connect Timeout=15;Encrypt=False;Packet Size=4096" providerName="System.Data.SqlClient" />
    </connectionStrings>

    <system.web>
    <customErrors mode="Off"/>
    <compilation debug="true"/>
    <authentication mode="None"/>
    <compilation targetFramework="4.5" />

    <httpRuntime targetFramework="4.5" />
    <pages>
    <namespaces>
    <add namespace="System.Web.Optimization" />
    <add namespace="Microsoft.AspNet.Identity" />
    </namespaces>
    <controls>
    <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
    </controls>
    </pages>
    <membership>
    <providers>
    <!--
    ASP.NET Membership is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
    -->
    <clear />
    </providers>
    </membership>
    <profile>
    <providers>
    <!--
    ASP.NET Membership Profile is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
    -->
    <clear />
    </providers>
    </profile>
    <roleManager>
    <!--
    ASP.NET Membership Role is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
    -->
    <providers>
    <clear />
    </providers>
    </roleManager>
    <!--
    If you are deploying to a cloud environment that has multiple web server instances,
    you should change session state mode from "InProc" to "Custom". In addition,
    change the connection string named "DefaultConnection" to connect to an instance
    of SQL Server (including SQL Azure and SQL Compact) instead of to SQL Server Express.
    -->
    <sessionState mode="InProc" customProvider="DefaultSessionProvider">
    <providers>
    <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
    </providers>
    </sessionState>
    </system.web>
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
    <assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
    </dependentAssembly>
    </assemblyBinding>
    </runtime>
    <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
    <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
    </entityFramework>
    <system.webServer>
    <directoryBrowse enabled="true" />
    </system.webServer>
    </configuration>

    Saturday, January 13, 2018 5:36 PM

All replies

  • User-832373396 posted

    <g class="gr_ gr_26 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="26" data-gr-id="26">Hi</g> <g class="gr_ gr_7 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="7" data-gr-id="7">kavita</g>,

    <system.web>
    <customErrors mode="Off"/>
    <compilation debug="true"/>
    <authentication mode="None"/>
    <compilation targetFramework="4.5" />

    <httpRuntime targetFramework="4.5" />
    <pages>

    Here is the error point;

    Please change it to :

    <system.web>
    <customErrors mode="Off"/>
    <compilation debug="true" targetFramework="4.5" />
    <authentication mode="None"/>
    <httpRuntime targetFramework="4.5" />
    <pages>

    Then it will fix your question!

    With regards, Angelina Jolie

    Tuesday, January 16, 2018 5:41 AM