none
Ошибка конфигурации RRS feed

  • Вопрос

  • Ошибка сервера в приложении '/mykladr'.

    Ошибка конфигурации

    Описание: Ошибка при обработке файла конфигурации, требуемого для обслуживания этого запроса. Изучите указанные ниже подробные сведения об этой ошибке и измените файл конфигурации. 

    Сообщение об ошибке синтаксического анализатора: Запись 'ApplicationServices' уже добавлена.

    Ошибка источника: 
    Строка 10:   </configSections>
    Строка 11:   <connectionStrings>
    Строка 12:     <add name="ApplicationServices" connectionString="Data Source=kit-pc;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient" />
    Строка 13:     <add name="DefaultConnection" connectionString="Data Source=kit-pc;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient" />
    Строка 14:     <add name="NewKladrConnectionString" connectionString="Data Source=kit-pc;Initial Catalog=NewKladr;Integrated Security=True" providerName="System.Data.SqlClient" />

    Исходный файл: C:\inetpub\wwwroot\mykladr\web.config    Строка: 12 


    Информация о версии: Платформа Microsoft .NET Framework, версия:4.0.30319; ASP.NET, версия:4.0.30319.18045

    _________________________________________________________________________________________________________________________

    web application делаю развернуть сайт -> выбираю webdeploy. запускаюсь по адресу http://localhost/mykladr  выдает ошибку выше.

    мой web.config:

    <?xml version="1.0"?>
    <!--
      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=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
      </configSections>
      <connectionStrings>
        <add name="ApplicationServices" connectionString="Data Source=kit-pc;Initial Catalog=aspnetdb;Integrated Security=True"
          providerName="System.Data.SqlClient" />
        <add name="DefaultConnection" connectionString="Data Source=kit-pc;Initial Catalog=aspnetdb;Integrated Security=True"
          providerName="System.Data.SqlClient" />
        <add name="NewKladrConnectionString" connectionString="Data Source=kit-pc;Initial Catalog=NewKladr;Integrated Security=True"
          providerName="System.Data.SqlClient" />
        <add name="mykladruserdataConnectionString" connectionString="Data Source=kit-pc;Initial Catalog=mykladruserdata;Integrated Security=True"
          providerName="System.Data.SqlClient" />
        <add name="aspnetdbConnectionString" connectionString="Data Source=kit-pc\;Initial Catalog=aspnetdb;Integrated Security=True"
          providerName="System.Data.SqlClient" />
        <add name="UsersConnectionString" connectionString="Data Source=kit-pc\;Initial Catalog=Users;Integrated Security=True"
          providerName="System.Data.SqlClient" />
        <add name="picturesConnectionString" connectionString="Data Source=kit-pc\;Initial Catalog=pictures;Integrated Security=True"
          providerName="System.Data.SqlClient" />
        <add name="categoryConnectionString" connectionString="Data Source=kit-pc\;Initial Catalog=category;Integrated Security=True"
          providerName="System.Data.SqlClient" />
        <add name="groupsConnectionString" connectionString="Data Source=kit-pc\;Initial Catalog=groups;Integrated Security=True"
          providerName="System.Data.SqlClient" />
        <add name="answersConnectionString" connectionString="Data Source=kit-pc\;Initial Catalog=answers;Integrated Security=True"
          providerName="System.Data.SqlClient" />
      </connectionStrings>
      <!--
        For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.
    
        The following attributes can be set on the <httpRuntime> tag.
          <system.Web>
            <httpRuntime targetFramework="4.5" />
          </system.Web>
      -->
      <system.web>
        <compilation debug="true" targetFramework="4.5">
          <assemblies>
            <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"/>
            <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          </assemblies>
        </compilation>
        <httpRuntime/>
        <pages controlRenderingCompatibilityVersion="4.0">
          <namespaces>
            <add namespace="System.Web.Optimization"/>
          </namespaces>
          <controls>
            <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
            <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>
          </controls>
        </pages>
        <authentication mode="Forms">
          <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
        </authentication>
        <membership>
          <providers>
            <clear/>
            <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"  minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"         
                 passwordStrengthRegularExpression="(?=.*\d)(?=.*[a-z])(?=.*[A-Z])+"
    
    />
          </providers>
        </membership>
        <profile>
          <providers>
            <clear/>
            <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
          </providers>
          <properties>
            <add name="fullName"/>
          </properties>
        </profile>
        <roleManager enabled="true">
          <providers>
            <clear/>
            <add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider"/>
            <add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider"/>
          </providers>
        </roleManager>
        <sessionState timeout="1" 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>
      <entityFramework>
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
          <parameters>
            <parameter value="v11.0"/>
          </parameters>
        </defaultConnectionFactory>
      </entityFramework>
    </configuration>


    • Изменено Linklee 1 августа 2013 г. 10:10
    1 августа 2013 г. 10:08

Ответы