我在asp.net网站上有错误

时间:2016-06-24 08:38:01

标签: asp.net

 **I have error in local host**

    <?xml version="1.0"?>
        <configuration>
          <connectionStrings>
            <add name="conversationDB" providerName="System.Data.SqlClient" connectionString="Data Source=Mojtaba;Initial Catalog=conversation;Integrated Security=True"/>
          </connectionStrings>
            <system.web>
please resolve this error for me thank you 
              <roleManager>
                <providers>
                  <add connectionStringName="DefaultConnection" applicationName="/"
                    name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                </providers>
              </roleManager>
              <membership defaultProvider="Mymembershipprovider">
                <providers>
                  <add name="Mymembershipprovider" type="WebMatrix.WebData.MyRoleProvider, WebMatrix.WebData"/>
                </providers>
              </membership>
              <roleManager enabled="true" defaultProvider="MyRoleProvider">
                <providers>
                  <clear/>
                  <add name="MyRoleProvider" type="SecurityInASPNET.MyRoleProvider"/>
                </providers>
              </roleManager>
              <authentication mode="Forms">
                <forms name=".RememberMe" loginUrl="~/result.aspx" timeout="130000" slidingExpiration="true" defaultUrl="~/score/Mojtaba.aspx">
                </forms>
              </authentication>
              <compilation debug="true" targetFramework="4.5" />
              <httpRuntime targetFramework="4.5" />
            </system.web>
          <!--WebForms UnobtrusiveValidationModeخطای صفحه‌ی لاگین-->
          <appSettings>
            <add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
          </appSettings>
          <!--WebForms UnobtrusiveValidationModeخطای صفحه‌ی لاگین-->
          <location path="score_Mojtaba.aspx">
            <system.web>
              <authorization>
                <deny users="?"/>
              </authorization>
            </system.web>
          </location>
        </configuration>

1 个答案:

答案 0 :(得分:0)

你不应该有两个roleManager部分,删除无用的部分。