C# Class MvcInstaller.InstallWizard

This is the primary class that handles installing your web application.
Mostrar archivo Open project: kahanu/MvcInstaller Class Usage Examples

Public Methods

Method Description
InstallWizard ( ) : System
Run ( InstallerConfig config ) : void

Run the process to install the database and users.

UpdateConfig ( InstallerConfig config ) : void

Private Methods

Method Description
AddUsers ( InstallerConfig config ) : void

Add users and roles inside a transaction in case there's an exception, we can simply click the "Install" button again.

CreateMembership ( InstallerConfig config ) : void

Create the Membership database and set the roles and users.

ExecuteStatements ( string tableStatements, InstallerConfig config ) : void

This will execute the sql statements.

Fix ( ) : void

Fix an anomaly in the WebConfigurationManager Save method that encodes """ to "".

GetScriptStatements ( string p ) : string[]

This gets individual script statements from the sql script.

GetScriptStatements ( string p, StringSplitOptions options ) : string[]
ProviderCheck ( ) : void

Check that the correct providers are referenced for the Membership system. This version of MvcInstaller does NOT use the new SimpleMembershipProviders. It still uses the System.Web.Providers namespace.

RemoveAppInstalledKey ( ) : void

Remove the AppInstalled key from the appsettings section.

ResetDb ( InstallerConfig config ) : void

This is used before the System.Web.Management.SqlServices.Uninstall class to remove any constraints that you may have put on your table and the aspnet Db tables. You create the scripts and drop them into the App_Data\Reset folder.

RunScripts ( InstallerConfig config ) : void

Run the sql scripts in the location set in the installer.config file.

UpdateWebConfig ( InstallerConfig config ) : void

Write the new connection string to the web.config file and update the membership sections if necessary.

Method Details

InstallWizard() public method

public InstallWizard ( ) : System
return System

Run() public static method

Run the process to install the database and users.
public static Run ( InstallerConfig config ) : void
config MvcInstaller.Settings.InstallerConfig
return void

UpdateConfig() public static method

public static UpdateConfig ( InstallerConfig config ) : void
config MvcInstaller.Settings.InstallerConfig
return void