geeman
  •  geeman
  • 57.8% (Neutral)
  • YAF Forumling Topic Starter
2008-05-29T06:11:34Z
I think I figured out why the configPassword was being saved multiple times if the wizard is run more than once.

The following code is from YetAnotherForum.NET/install/default.cs

Quote:

try
{
Configuration config = WebConfigurationManager.OpenWebConfiguration( "~/" );
AppSettingsSection appSettings = config.GetSection( "appSettings" ) as AppSettingsSection;

if ( appSettings.Settings ["configPassword"] == null )
appSettings.Settings.Remove( "configPassword" );

appSettings.Settings.Add( "configPassword", System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile( TextBox1.Text, "md5" ) );
config.Save( ConfigurationSaveMode.Modified );
e.Cancel = false;
}
catch
{
throw new Exception( "Unable to save the configPassword. Please verify that the ASPNET user has write access permissions to the app.config file." );
}



The condition of line 6 above should be:

Quote:

if ( appSettings.Settings ["configPassword"] != null )


Sponsor

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved