2013-12-16 34 views
1

我已經嘗試了所有解決此問題的方法,並且似乎無法清除此錯誤。解析器錯誤消息:條目'DefaultProfileProvider'已被添加

這裏是我的web.config代碼:

  <?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=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 
<section name="glimpse" type="Glimpse.Core.Configuration.Section, Glimpse.Core" /> 
<section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel,    Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
      </configSections> 
     <connectionStrings> 
      <add name="MobileReportsEntities" connectionString="metadata=res://*/Models.MobileReports.csdl|res://*/Models.MobileReports.ssdl|res://*/Models.MobileReports.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=sqlgii02da1.dev.ardentmc.com\gii;initial catalog=MobileReports;User ID=MobileReports;Password=mobile;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /> 
      <add name="MacEntities" connectionString="metadata=res://*/Shared.Identity.Mac.csdl|res://*/Shared.Identity.Mac.ssdl|res://*/Shared.Identity.Mac.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=sqlirad01d.dev.ardentmc.com;initial catalog=Shared;persist security info=True;user id=IdentityClient;password=Id3ntityCli3nt;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /> 
     </connectionStrings> 
     <appSettings> 
<add key="webpages:Version" value="2.0.0.0" /> 
<add key="webpages:Enabled" value="false" /> 
<add key="PreserveLoginUrl" value="true" /> 
<add key="ClientValidationEnabled" value="true" /> 
<add key="UnobtrusiveJavaScriptEnabled" value="true" /> 
<add key="logoLarge" value="~/Images/dhslogo.png" /> 
<add key="logoSmall" value="~/Images/dhslogo20x20.png" /> 
<add key="ApplicationUserGroup" value="Department of Homeland Security" /> 
<add key="ApplicationName" value="COP Mobile" /> 
<add key="ApplicationHeader" value="DHS COP Mobile" /> 
<add key="JQueryMobileCSS" value="~/Content/jquery.mobile.structure-1.3.0.css" /> 
<add key="JQueryMobileThemeCSS" value="~/Content/jquery.mobile.theme-1.3.0.css" /> 
<add key="ThemeCSS" value="~/Content/themes/dhs-jqm-theme-1.css" /> 
<add key="SiteCSS" value="~/Content/Site.css" /> 
<add key="JQueryJS" value="~/Scripts/jquery-1.9.1.js" /> 
<add key="JQueryUIJS" value="~/Scripts/jquery-ui-1.10.1.custom.js" /> 
<add key="JQueryMobileJS" value="~/Scripts/jquery.mobile-1.3.0.js" /> 
<add key="UtilitiesJS" value="~/Scripts/Utilities.js" /> 
<add key="HeaderActivationJS" value="~/Scripts/HeaderActivation.js" /> 
<add key="NavbarsJS" value="~/Scripts/Navbars.js" /> 
<add key="MobilePopupJS" value="~/Scripts/MobilePopup.js" /> 
<add key="LayersConfigFile" value="default_layers.xml"/> 
<add key="ActiveIncidentsFeed" value="https://gii-dev.ardentmc.net/tokenauth/georss/COPLite/?token=446A6778-9F41-40ED-8A76-923E40B07CED" /> 
     <add key="FeedRefreshInterval" value="180000"/> 
     <add key="FileDownloadPrefix" value="https://gii-dev.ardentmc.net/tokenauth/georss/CopLiteService/GetFile.ashx?token=446A6778-9F41-40ED-8A76-923E40B07CED&amp;fileId=" /> 
    <add key="GiiHome" value="https://gii-dev.ardentmc.net"/> 
    <add key="UseAuthentication" value="false" /> 
    <add key="AuthenticationName" value="HSIN" /> 
     <add key="ProxyUrl" value="" /> 
    </appSettings> 
    <system.web> 
     <customErrors mode="Off" /> 
     <compilation debug="true" targetFramework="4.5"> 
      <assemblies> 
      <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral,  PublicKeyToken=b77a5c561934e089" /> 
      </assemblies> 
      </compilation> 
      <httpRuntime maxRequestLength="102400" requestValidationMode="4.5" /> <!--targetFramework="4.5" **I took this out**--> 
      <machineKey compatibilityMode="Framework20SP1" validationKey="8A0FDB3F447F173B7D2821B17E41B3350733FE098D0B403F93C8E41269F57ADF88C6009A8F9071C3A7B1AF9382DAC219A3A5CE0BF0C8D2DA3E2ACBF155B87B5D" decryptionKey="15C8F55337FBC0FD7F83404F0BF6FA472614C94D1E6F3EB5" validation="SHA1" /> 
      <authentication mode="Forms"> 
      <forms loginUrl="~/Account/Login" name=".GIIFORMSAUTH" protection="All" domain="ardentmc.com" /> 
      </authentication> 
      <identity impersonate="true" /> 
     <pages> 
      <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.Optimization" /> 
    <add namespace="System.Web.Routing" /> 
    <add namespace="System.Web.WebPages" /> 
    </namespaces> 
</pages> 
<profile defaultProvider="DefaultProfileProvider"> 
    <providers> 
    <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="MobileReportsEntities" applicationName="/" /> 
    </providers> 
</profile> 
<membership defaultProvider="DefaultMembershipProvider"> 
    <providers> 
    <add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="MobileReportsEntities" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> 
    </providers> 
</membership> 
<roleManager defaultProvider="DefaultRoleProvider"> 
    <providers> 
    <add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="MobileReportsEntities" applicationName="/" /> 
    </providers> 
</roleManager> 
<sessionState mode="InProc" customProvider="DefaultSessionProvider" timeout="2880"> 
    <providers> 
    <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="MobileReportsEntities" /> 
    </providers> 
</sessionState> 
    <httpModules> 
     <add name="Glimpse" type="Glimpse.AspNet.HttpModule, Glimpse.AspNet" /> 
     </httpModules> 
      <httpHandlers> 
      <add path="glimpse.axd" verb="GET" type="Glimpse.AspNet.HttpHandler, Glimpse.AspNet" /> 
      </httpHandlers> 
      </system.web> 
      <system.webServer> 
      <validation validateIntegratedModeConfiguration="false" /> 
     <handlers> 
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /> 
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /> 
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> 
      <remove name="Glimpse" /> 
       <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> 
        <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> 
       <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> 
        <add name="Glimpse" path="glimpse.axd" verb="GET" type="Glimpse.AspNet.HttpHandler, Glimpse.AspNet" preCondition="integratedMode" /> 
        </handlers> 
       <modules> 
       <remove name="Glimpse" /> 
        <add name="Glimpse" type="Glimpse.AspNet.HttpModule, Glimpse.AspNet" preCondition="integratedMode" /> 
        </modules> 
        </system.webServer> 
        <runtime> 
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
        <dependentAssembly> 
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> 
       <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> 
       </dependentAssembly> 
       <dependentAssembly> 
      <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> 
       </dependentAssembly> 
     </assemblyBinding> 
     <legacyHMACWarning enabled="0" /> 
     </runtime> 
     <entityFramework> 
      <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> 
      </entityFramework> 
      <system.net> 
      <defaultProxy enabled="true" /> 
      <settings> 
        <!-- This setting causes .NET to check certificate revocation lists (CRL) 
      before trusting HTTPS certificates. But this setting tends to not 
      be allowed in shared hosting environments. --> 
        <!--<servicePointManager checkCertificateRevocationList="true"/>--> 
        </settings> 
      </system.net> 
       <uri> 
       <!-- The uri section is necessary to turn on .NET 3.5 support for IDN (international domain names), 
     which is necessary for OpenID urls with unicode characters in the domain/host name. 
     It is also required to put the Uri class into RFC 3986 escaping mode, which OpenID and OAuth require. --> 
       <idn enabled="All" /> 
        <iriParsing enabled="true" /> 
         </uri> 
       <glimpse defaultRuntimePolicy="On" endpointBaseUri="~/Glimpse.axd"> 
<!-- If you are having issues with Glimpse, please include this. It will help us figure out whats going on. 
    <logging level="Trace"/>--> 
<!-- Want to use Glimpse on a remote server? Ignore the LocalPolicy by removing this comment. 
    <runtimePolicies> 
    <ignoredTypes> 
     <add type="Glimpse.AspNet.Policy.LocalPolicy, Glimpse.AspNet"/> 
    </ignoredTypes> 
     </runtimePolicies>--> 
      </glimpse> 
      <system.identityModel> 
      <identityConfiguration> 
       <claimsAuthenticationManager type="ArdentMC.Security.Identity.ClaimsManager, ArdentMC.Security.Identity"/> 
        <claimsAuthorizationManager type="ArdentMC.Security.Identity.AccessManager, ArdentMC.Security.Identity" /> 
        <claimsAuthenticationManager type="ArdentMC.Security.Identity.ClaimsManager, ArdentMC.Security.Identity" /> 
      </identityConfiguration> 
      </system.identityModel> 
      </configuration> 

沒有任何人有任何想法如何修復此錯誤我不斷收到? 任何意見或幫助將不勝感激。 預先感謝您。

+0

您使用的是網站還是Web應用程序(在IIS中部署時)? – CharlesAD

回答

0

我修正了這個問題。我正在使用visual studio來檢查多個項目,並且我的web配置文件與我在visual studio中的另一個項目重疊...我只需要斷開我沒有使用的項目並修復了重複錯誤。

相關問題