在进行了一系列的试验安装后,我们来看看Dotnetnuke3.10.4中配置文件中到底定义了些什么Professional.DotNetNuke.ASP.dot.NET.Portals一书中的原话:The Web.config is the central administration file for ASP.NET; it is designed to store configuration settings such as connection strings and site-specific settings.)。

下面是文件中的具体设定:

<configuration>

  <!-- register local configuration handlers -->

// <configSections>中定义了一些节组,这些节组在配置文件中的后半部分有对应的内容,并为每个节设定处理程序类

  <configSections>

    <sectionGroup name="dotnetnuke">

      <section name="data" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />

      <section name="logging" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />

      <section name="scheduling" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />

      <section name="htmlEditor" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />

      <section name="searchIndex" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />

      <section name="searchDataStore" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />

      <section name="friendlyUrl" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />

      <section name="caching" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />

    </sectionGroup>

    <sectionGroup name="memberrolesprototype">

      <section name="membership" type="Microsoft.ScalableHosting.Configuration.MembershipConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562" />

      <section name="roleManager" type="Microsoft.ScalableHosting.Configuration.RolesConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562" />

      <section name="profile" type="Microsoft.ScalableHosting.Configuration.ProfileConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562" />

      <section name="anonymousIdentification" type="Microsoft.ScalableHosting.Configuration.AnonymousIdConfigHandler, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562" />

    </sectionGroup>

  </configSections>

  <!-- the old connectionString setting has been deprecated and replaced with the data provider section below -->

//下面是一些健值对

  <appSettings>

<add key="SiteSqlServer" value="Server=(local);Database=DotNetNuke;uid=;pwd=;" />

数据字符串的键值对

    <add key="MachineValidationKey" value="19DA4069C8FB68C1C58DED6E030D1FFD34C25BB2" />

    <add key="MachineDecryptionKey" value="059C95E0A71289F9CAF7FB62CC696FB0238B04CF8514E95B" />

<add key="MachineValidationMode" value="SHA1" />

上面三个在进行Web Farm 配置和状态会话管理时是有用的,机器验证字符串、解密字符串,以及加密方法

<add key="InstallTemplate" value="DotNetNuke.install.resources" />

安装模板

<add key="AutoUpgrade" value="true" />

自动升级

<add key="UseDnnConfig" value="true" />

使用DNN的配置文件

<add key="InstallMemberRole" value="true" />

安装成员角色

    <!--optionally install the MemberRole scripts -->

<add key="ShowMissingKeys" value="false" />

    <!-- Show missing translation keys (for development use) -->

<add key="EnableWebFarmSupport" value="false" />

设定为不支持Web Farm场的安装

    <!--Set to true to enable web farm suppot.  See Web Farm Support documentation for additional configuration steps.-->

<add key="EnableCachePersistence" value="false" />

设定为不是持久化的缓存

    <!--Some cached items can persist an app recycle by serializing the object to disk. Set to "true" to enable this performance enhancement.-->

<add key="InstallationDate" value="2005-10-17" />

安装日期

  </appSettings>

  <system.web>

    <!-- HttpModules for Common Functionality -->

   http模块
<httpModules>

      <add name="UrlRewrite" type="DotNetNuke.HttpModules.UrlRewriteModule, DotNetNuke.HttpModules.UrlRewrite" />

      <add name="Exception" type="DotNetNuke.HttpModules.ExceptionModule, DotNetNuke.HttpModules.Exception" />

      <add name="UsersOnline" type="DotNetNuke.HttpModules.UsersOnlineModule, DotNetNuke.HttpModules.UsersOnline" />

      <add name="ProfilePrototype" type="Microsoft.ScalableHosting.Profile.ProfileModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562" />

      <add name="AnonymousIdentificationPrototype" type="Microsoft.ScalableHosting.Security.AnonymousIdentificationModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562" />

      <add name="RoleManagerPrototype" type="Microsoft.ScalableHosting.Security.RoleManagerModule, MemberRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7c773fb104e7562" />

      <add name="DNNMembership" type="DotNetNuke.HttpModules.DNNMembershipModule, DotNetNuke.HttpModules.DNNMembership" />

      <add name="Personalization" type="DotNetNuke.HttpModules.PersonalizationModule, DotNetNuke.HttpModules.Personalization" />

</httpModules>

以上是注册几个扩展的模块

    <!-- This is for FTB 3.0 support -->

    <httpHandlers>

      <add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />

</httpHandlers>

这个是注册一个对特定的FtbWebResource.axd文件的处理

    <!-- set code access security trust level - this is generally set in the machine.config

         <trust level="Medium" originUrl="http://localhost/.*" />

         -->

    <!-- set debugmode to false for running application -->

<compilation debug="true" />

编译

    <!-- permits errors to be displayed for remote clients -->

<customErrors mode="RemoteOnly" />

不允许远程客户端的错误显示,只允许在本地调试信息的显示

    <!-- Forms or Windows authentication -->

    <authentication mode="Forms">

      <forms name=".DOTNETNUKE" protection="All" timeout="60" />

</authentication>

使用Forms身份验证

    <!--

             <identity impersonate="true"/>

             <authentication mode="Windows">

             </authentication>

         -->

    <!-- allow large file uploads -->

    <httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="8192" />

    <!--  GLOBALIZATION

         This section sets the globalization settings of the application.

         Utf-8 is not supported on Netscape 4.x

         If you need netscape compatiblity leave iso-8859-1.

         UTF-8 is recommended for complex languages

         -->

asp.net运行库的重要配置

<globalization culture="zh-CN" uiCulture="zh-CN" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8" />

全局化设置

    <!--<globalization culture="zh-CN" uiCulture="zh-CN"  fileEncoding="iso-8859-1" requestEncoding="iso-8859-1" responseEncoding="iso-8859-1"/>-->

    <!-- page level options -->

<pages validateRequest="false" enableViewStateMac="true" />

用以指定页面配置的默认值

  </system.web>

dnn对用户角色及权限机制是使用了asp.net2.0中的api,具体的东西我还不清楚,下面是一些对角色及权限的设定
 
<memberrolesprototype>

    <!-- membership config:

              Attributes:

                  userIsOnlineTimeWindow="int"                Time window (in minutes) to consider a User as being Online after since last activity

                  hashAlgorithmType="[SHA1|SHA512|MD5|...]"   Any valid hash algorithm supported by .NET framework, default is SHA1

              Child nodes:

                <providers>              Providers (class must inherit from MembershipProvider)

                    <add                 Add a provider

                        name="string"    Name to identify this provider instance by

                        type="string"    Class that implements MembershipProvider

                        provider-specific-configuration />

 

                </providers>

 

                Configuration for SqlMembershipProvider and AccessMembershipProvider:

                   connectionStringName="string"              Name corresponding to the entry in <connectionStrings> section where the connection string for the provider is specified

                   passwordAttemptThreshold="int"             The number of failed password attempts, or failed password answer attempts that are allowed before locking out a user?s account

                   passwordAttemptWindow="int"                The time window, in minutes, during which failed password attempts and failed password answer attempts are tracked

                   enablePasswordRetrieval="[true|false]"     Should the provider support password retrievals

                   enablePasswordReset="[true|false]"         Should the provider support password resets

                   requiresQuestionAndAnswer="[true|false]"   Should the provider require Q & A

                      minRequiredPasswordLength="int"              The minimum password length

                      minRequiredNonalphanumericCharacters="int" The minimum number of non-alphanumeric characters

                   applicationName="string"                   Optional string to identity the application: defaults to Application Metabase path

                   requiresUniqueEmail="[true|false]"         Should the provider require a unique email to be specified

                   passwordFormat="[Clear|Hashed|Encrypted]"  Storage format for the password: Hashed (SHA1), Clear or Encrypted (Triple-DES)

                   description="string"                       Description of what the provider does

        -->

    <membership userIsOnlineTimeWindow="15">

      <providers>

        <add name="DNNSQLMembershipProvider" type="DotNetNuke.Security.Membership.DNNSQLMembershipProvider, DNNSQLMembershipProvider" connectionStringName="SiteSqlServer" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" requiresUniqueEmail="false" passwordFormat="Encrypted" applicationName="/" description="Stores and retrieves membership data from the local Microsoft SQL Server database" />

      </providers>

    </membership>

    <!-- Configuration for roleManager:

                enabled="[true|false]"                            Feature is enabled?

                cacheRolesInCookie="[true|false]"                 Cache roles in cookie?

                cookieName=".ASPXROLES"                           Cookie Name

                createPersistentCookie="[true|false]"             Creates a persistent cookie or session cookie?

                cookieTimeout="30"                                Cookie Timeout

                cookiePath="/"                                    Cookie Path

                cookieRequireSSL="[true|false]"                   Set Secure bit in Cookie

                cookieSlidingExpiration="[true|false]"            Reissue expiring cookies?

                cookieProtection="[None|Validation|Encryption|All]"    How to protect cookies from being read/tampered

                defaultProvider="string"                          Name of provider to use by default

                domain="[domain]"                                 Enables output of the "domain" cookie attribute set to the specified value

                maxCachedResults="int"                            Maximum number of roles to cache in cookie

 

               Child nodes:

                <providers>              Providers (class must inherit from RoleProvider)

 

                    <add                 Add a provider

                        name="string"    Name to identify this provider instance by

                        type="string"    Class that implements RoleProvider

                        provider-specific-configuration />

 

                </providers>

 

 

                <providers> type="TypeName"                        Class that inherits from System.Web.Security.RoleProvider

                    providerSpecificConfig                        Config for the provider

 

 

           Configuration for SqlRoleProvider:

                   connectionStringName="string"  Name corresponding to the entry in <connectionStrings> section where the connection string for the provider is specified

                   description="string"           Description of what the provider does

                   commandTimeout="int"           Command timeout value for SQL command

        -->

    <roleManager cacheRolesInCookie="true" cookieName=".ASPXROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" createPersistentCookie="false" cookieProtection="All">

      <providers>

        <add name="DNNSQLRoleProvider" type="DotNetNuke.Security.Role.DNNSQLRoleProvider, DNNSQLRoleProvider" connectionStringName="SiteSqlServer" applicationName="/" description="Stores and retrieves roles data from the local Microsoft SQL Server database" />

      </providers>

    </roleManager>

    <!--

            Configuration for profile:

             <profile>

                enabled="[true|false]"   Feature is enabled?

                automaticSaveEnabled="[true|false]" Enable automatic save of profile

                inherits="type-name"     Class from which the profile type inherits from. This type must inherit from ProfileBase type.

 

                <providers>              Providers (class must inherit from ProfileProvider)

                    <add                 Add a provider (only single entry supported)

                        name="string"    Name to identify this provider instance by

                        type="string"    Class that implements ProfileProvider

                        provider-specific-configuration />

                <providers>

 

                <properties>                Optional element. List of properties in the Profile system

                    <add                    Add a property

                            name="string"                 Name of the property

                            type="string"                 Optional. Type of the property. Default: string.

                            readOnly="[true|false]"       Optional. Is Value read-only. Default: false.

                            defaultValue="string"         Optional. Default Value. Default: Empty string.

                            allowAnonymous="[true|false]" Optional. Allow storing values for anonymous users. Default: false.

                            serializeAs=["String|Xml|Binary|ProviderSpecific"] Optional. How to serialize the type. Default: ProviderSpecific.

                        />

                </properties>

             </profile>

        -->

    <profile enabled="true">

      <providers>

        <add name="AspNetSqlProvider" type="DotNetNuke.Users.Profile.DNNSQLProfileProvider, DNNSQLProfileProvider" connectionStringName="SiteSqlServer" applicationName="/" description="Stores and retrieves profile data from the local Microsoft SQL Server database" />

      </providers>

      <properties>

        <add name="FirstName" type="string" allowAnonymous="true" />

        <add name="LastName" type="string" allowAnonymous="true" />

        <add name="Unit" type="string" allowAnonymous="true" />

        <add name="Street" type="string" allowAnonymous="true" />

        <add name="City" type="string" allowAnonymous="true" />

        <add name="Region" type="string" allowAnonymous="true" />

        <add name="PostalCode" type="string" allowAnonymous="true" />

        <add name="Country" type="string" allowAnonymous="true" />

        <add name="Telephone" type="string" allowAnonymous="true" />

        <add name="Fax" type="string" allowAnonymous="true" />

        <add name="Cell" type="string" allowAnonymous="true" />

        <add name="Website" type="string" allowAnonymous="true" />

        <add name="IM" type="string" allowAnonymous="true" />

        <add name="TimeZone" type="integer" allowAnonymous="true" />

        <add name="PreferredLocale" type="string" allowAnonymous="true" />

      </properties>

    </profile>

    <!--

            anonymousIdentification configuration:

                enabled="[true|false]"                            Feature is enabled?

                cookieName=".ASPXANONYMOUS"                       Cookie Name

                cookieTimeout="100000"                            Cookie Timeout in minutes

                cookiePath="/"                                    Cookie Path

                cookieRequireSSL="[true|false]"                   Set Secure bit in Cookie

                cookieSlidingExpiration="[true|false]"            Reissue expiring cookies?

                cookieProtection="[None|Validation|Encryption|All]"    How to protect cookies from being read/tampered

                domain="[domain]"                                 Enables output of the "domain" cookie attribute set to the specified value

        -->

    <anonymousIdentification enabled="true" cookieName=".ASPXANONYMOUS" cookieTimeout="100000" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="None" domain="" />

  </memberrolesprototype>

下面是对dotnetnuke命名空间中的程序集的一些设定
 
<dotnetnuke>

    <htmlEditor defaultProvider="Ftb3HtmlEditorProvider">

      <providers>

        <clear />

        <!--

                        FTB options:

                        ============

                        toolbarStyle="Office2003|OfficeXP|Office2000|OfficeMac"  Sets the default FTB Toolbar style

                        enableProFeatures="[true|false]"                         Pro features require a license from FreeTextBox

                                                                                 or you may test them with localhost only

                        spellCheck="[{none}|IeSpellCheck|NetSpell]"              IeSpellCheck is free for non-commercial use only

                                                                                 NetSpell requires some integration work

                   -->

        <add name="Ftb3HtmlEditorProvider" type="DotNetNuke.HtmlEditor.Ftb3HtmlEditorProvider, DotNetNuke.Ftb3HtmlEditorProvider" providerPath="~\Providers\HtmlEditorProviders\Ftb3HtmlEditorProvider\" toolbarStyle="Office2003" enableProFeatures="false" spellCheck="" />

      </providers>

    </htmlEditor>

    <searchIndex defaultProvider="ModuleIndexProvider">

      <providers>

        <clear />

        <add name="ModuleIndexProvider" type="DotNetNuke.Services.Search.ModuleIndexer, DotNetNuke.Search.Index" providerPath="~\Providers\SearchProviders\ModuleIndexer\" />

      </providers>

    </searchIndex>

    <searchDataStore defaultProvider="SearchDataStoreProvider">

      <providers>

        <clear />

        <add name="SearchDataStoreProvider" type="DotNetNuke.Services.Search.SearchDataStore, DotNetNuke.Search.DataStore" providerPath="~\Providers\SearchProviders\SearchDataStore\" />

      </providers>

    </searchDataStore>

    <data defaultProvider="SqlDataProvider">

      <providers>

        <clear />

        <add name="SqlDataProvider" type="DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider" connectionStringName="SiteSqlServer" upgradeConnectionString="" providerPath="~\Providers\DataProviders\SqlDataProvider\" objectQualifier="" databaseOwner="dbo" />

      </providers>

    </data>

    <logging defaultProvider="DBLoggingProvider">

      <providers>

        <clear />

        <add name="XMLLoggingProvider" type="DotNetNuke.Services.Log.EventLog.XMLLoggingProvider, DotNetNuke.XMLLoggingProvider" configfilename="LogConfig.xml.resources" providerPath="~\Providers\LoggingProviders\XMLLoggingProvider\" />

        <add name="DBLoggingProvider" type="DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider, DotNetNuke.Provider.DBLoggingProvider" providerPath="~\Providers\LoggingProviders\Provider.DBLoggingProvider\" />

      </providers>

    </logging>

    <scheduling defaultProvider="DNNScheduler">

      <providers>

        <clear />

        <add name="DNNScheduler" type="DotNetNuke.Services.Scheduling.DNNScheduling.DNNScheduler, DotNetNuke.DNNScheduler" providerPath="~\Providers\SchedulingProviders\DNNScheduler\" debug="false" maxThreads="1" />

      </providers>

    </scheduling>

    <friendlyUrl defaultProvider="DNNFriendlyUrl">

      <providers>

        <clear />

        <add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules.UrlRewrite" includePageName="true" />

      </providers>

    </friendlyUrl>

    <caching defaultProvider="FileBasedCachingProvider">

      <providers>

        <clear />

        <add name="FileBasedCachingProvider" type="DotNetNuke.Services.Cache.FileBasedCachingProvider.FBCachingProvider, DotNetNuke.Caching.FileBasedCachingProvider" providerPath="~\Providers\CachingProviders\FileBasedCachingProvider\" />

        <add name="BroadcastPollingCachingProvider" type="DotNetNuke.Services.Cache.BroadcastPollingCachingProvider.BPCachingProvider, DotNetNuke.Caching.BroadcastPollingCachingProvider" providerPath="~\Providers\CachingProviders\BroadcastPollingCachingProvider\" />

      </providers>

    </caching>

  </dotnetnuke>

</configuration>

对于dnn这么大的项目,我们只有动手和亲自感受实践,才能真正的从中学到点什么