CS2007 启动过程 (一)
web.config:
<httpModules>
<add name="CommunityServer" type="CommunityServer.CSHttpModule, CommunityServer.Components" />
</httpModules>
CSHttpModule.cs:
register event handlers
CSHttpModule.Application_BeginRequest:
make url valid (modify <,>,",\ to %3c, %3e, %22, %27), and redirect
get CSConfiguration
CSConfiguration.GetConfig:
try get from cache
if not get:
load XmlDocument from communityserver.config
if communityserver_override.config exists merge first.
new CSConfiguration(XmlDocument):
LoadValuesFromConfigurationXml:
load CommunityServer\Core attributes
load providers: //Telligent.Components.Provider: Name, Type, Attributes, ExtensionType
CommonDataProvider
ForumDataProvider
WeblogDataProvider
GalleryDataProvider
ProviderHelper
SiteUrlsDataProvider
ApplicationKeyProvider
EmailTemplateProvider
EmailQueueProvider
CommonEmailsProvider
WeblogEmailsProvider
GalleryEmailsProvider
FilesEmailsProvider
ForumEmailsProvider
SearchProvider
FileGalleryDataProvider
FeedReaderDataProvider
RollerBlogsDataProvider
MemberRoleProfileProvider
load appLocation: //AppLocation : Get ApplicationType(forum, blog, file,...)from url
BlogPublic
Forums
GalleryPublic
Admin
FileGallery
FeedReader
BlogRoller
Installer
load extensionModules: //extensionModules here is a Telligent.Components.Provider, too
PassportAuthentication : Security
WindowsAuthentication : Security
FormsAuthentication : Security
CustomAuthentication : Security
EncryptionProvider : Encryption
load roleConfiguration:
currently not aviable from communityserver.config, so will create a default RolesConfiguration
this should be a custom string to replace built in role title "EveryOne", "Registered Users"...
load fielterLanguages: //every section has a language, user can hide sections in language that he dont want to see, this is for all languages aviable
...
load edtiors:
PlainText
Standard
Enhanced
if no AppLocation or RolesConfiguration, create default ones
if config.AppLocation.CurrentApplicationType == ApplicationType.Installer return
check WWWStatus
if not valid SEO friendly redirect with 301 result
check SSL
create CSContext and Save it
<httpModules>
<add name="CommunityServer" type="CommunityServer.CSHttpModule, CommunityServer.Components" />
</httpModules>
CSHttpModule.cs:
register event handlers
CSHttpModule.Application_BeginRequest:
make url valid (modify <,>,",\ to %3c, %3e, %22, %27), and redirect
get CSConfiguration
CSConfiguration.GetConfig:
try get from cache
if not get:
load XmlDocument from communityserver.config
if communityserver_override.config exists merge first.
new CSConfiguration(XmlDocument):
LoadValuesFromConfigurationXml:
load CommunityServer\Core attributes
load providers: //Telligent.Components.Provider: Name, Type, Attributes, ExtensionType
CommonDataProvider
ForumDataProvider
WeblogDataProvider
GalleryDataProvider
ProviderHelper
SiteUrlsDataProvider
ApplicationKeyProvider
EmailTemplateProvider
EmailQueueProvider
CommonEmailsProvider
WeblogEmailsProvider
GalleryEmailsProvider
FilesEmailsProvider
ForumEmailsProvider
SearchProvider
FileGalleryDataProvider
FeedReaderDataProvider
RollerBlogsDataProvider
MemberRoleProfileProvider
load appLocation: //AppLocation : Get ApplicationType(forum, blog, file,...)from url
BlogPublic
Forums
GalleryPublic
Admin
FileGallery
FeedReader
BlogRoller
Installer
load extensionModules: //extensionModules here is a Telligent.Components.Provider, too
PassportAuthentication : Security
WindowsAuthentication : Security
FormsAuthentication : Security
CustomAuthentication : Security
EncryptionProvider : Encryption
load roleConfiguration:
currently not aviable from communityserver.config, so will create a default RolesConfiguration
this should be a custom string to replace built in role title "EveryOne", "Registered Users"...
load fielterLanguages: //every section has a language, user can hide sections in language that he dont want to see, this is for all languages aviable
...
load edtiors:
PlainText
Standard
Enhanced
if no AppLocation or RolesConfiguration, create default ones
if config.AppLocation.CurrentApplicationType == ApplicationType.Installer return
check WWWStatus
if not valid SEO friendly redirect with 301 result
check SSL
create CSContext and Save it