Ten kód jsem s resetem hesla jsem si vygooglil a našel ho na několika místech. Pokud vím tak změnu hesla když neznám původní heslo jde udělat pouze pomocí resetu hesla ne? Toto je můj 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>
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<httpRuntime maxRequestLength="40000" executionTimeout="120" />
<customErrors mode="Off" />
<pages theme="Default"/>
<authentication mode="Forms" />
<authorization>
<allow roles="administrátor" />
<deny users="*" />
</authorization>
<membership defaultProvider="MyMembershipProvider">
<providers>
<clear/>
<add name="MyMembershipProvider"
type="Altairis.Web.Security.TableMembershipProvider, Altairis.Web.Security"
connectionStringName="ConnectionString" enablePasswordRetrieval="false"
enablePasswordReset="true" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="MyRoleProvider">
<providers>
<clear/>
<add name="MyRoleProvider"
type="Altairis.Web.Security.TableRoleProvider, Altairis.Web.Security"
connectionStringName="ConnectionString"/>
</providers>
</roleManager>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
</system.web>
</configuration>
|