Notas del Terrible
Заметки Ужасного Зануды

BlogEngine.NET, Umbraco, IIS7 Integrated

октября 22, 2009 13:37 by terR0Q

И вновь на заметку конфигурационный рецепт, на тему как жить счастливо с BlogEngine.NET, Umbraco и интегрированным режимом работы IIS 7.

Для этого нужно, во-первых, подключить ряд обработчиков и модулей в разделе настроек веб-сервера (узел system.webServer), во-вторых, отключить модули Umbraco. Как итог прописываем следующее содержимое в конфиге BlogEngine:

   1:      <system.webServer>
   2:   
   3:          <security>
   4:              <requestFiltering allowDoubleEscaping='True'/>
   5:          </security>
   6:   
   7:          <modules runAllManagedModulesForAllRequests='true'>
   8:              <add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule, BlogEngine.Core"/>
   9:              <add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite, BlogEngine.Core"/>
  10:              <add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule, BlogEngine.Core"/>
  11:              <add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule, BlogEngine.Core"/>
  12:              <!--Remove the default ASP.NET modules we don"t need-->
  13:              <remove name="PassportAuthentication"/>
  14:              <remove name="Profile"/>
  15:              <remove name="AnonymousIdentification"/>
  16:          </modules>
  17:   
  18:          <handlers>
  19:              <add verb='*' name='File' path='file.axd' type='BlogEngine.Core.Web.HttpHandlers.FileHandler,BlogEngine.Core' />
  20:              <add verb='*' name='Image' path='image.axd' type='BlogEngine.Core.Web.HttpHandlers.ImageHandler,BlogEngine.Core' />
  21:              <add verb='*' name='Syndication' path='syndication.axd' type='BlogEngine.Core.Web.HttpHandlers.SyndicationHandler,BlogEngine.Core' />
  22:              <add verb='*' name='Sitemap' path='sitemap.axd' type='BlogEngine.Core.Web.HttpHandlers.SiteMap,BlogEngine.Core' />
  23:              <add verb='*' name='Trackback' path='trackback.axd' type='BlogEngine.Core.Web.HttpHandlers.TrackbackHandler,BlogEngine.Core' />
  24:              <add verb='*' name='Pingback' path='pingback.axd' type='BlogEngine.Core.Web.HttpHandlers.PingbackHandler,BlogEngine.Core' />
  25:              <add verb='*' name='OpenSearch' path='opensearch.axd' type='BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler,BlogEngine.Core' />
  26:              <add verb='*' name='Metaweblog' path='metaweblog.axd' type='BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler,BlogEngine.Core' />
  27:              <add verb='*' name='RSD' path='rsd.axd' type='BlogEngine.Core.Web.HttpHandlers.RsdHandler,BlogEngine.Core' />
  28:              <add verb='*' name='CSS' path='css.axd' type='BlogEngine.Core.Web.HttpHandlers.CssHandler,BlogEngine.Core' />
  29:              <add verb='*' name='JS' path='js.axd' type='BlogEngine.Core.Web.HttpHandlers.JavaScriptHandler,BlogEngine.Core' />
  30:              <add verb='*' name='Rating' path='rating.axd' type='BlogEngine.Core.Web.HttpHandlers.RatingHandler,BlogEngine.Core' />
  31:              <add verb='*' name='OPML' path='opml.axd' type='BlogEngine.Core.Web.HttpHandlers.OpmlHandler,BlogEngine.Core' />
  32:              <add verb='*' name='BlogML' path='blogml.axd' type='BlogEngine.Core.Web.HttpHandlers.BlogMLExportHandler,BlogEngine.Core' />
  33:              <add verb='*' name='SIOC' path='sioc.axd' type='BlogEngine.Core.Web.HttpHandlers.Sioc,BlogEngine.Core' />
  34:              <add verb='*' name='APML' path='apml.axd' type='BlogEngine.Core.Web.HttpHandlers.Apml,BlogEngine.Core' />
  35:              <add verb='*' name='FOAF' path='foaf*.axd' type='BlogEngine.Core.Web.HttpHandlers.Foaf,BlogEngine.Core' />
  36:          </handlers>
  37:   
  38:          <validation validateIntegratedModeConfiguration='false' />
  39:   
  40:      </system.webServer>

А для отключения наследования веб-настроек Umbraco «обёртываем» узлы system.web, system.web.extensions, applicationSettings и system.webServer узлом location с атрибутом inheritInChildApplications:

<location path="." inheritInChildApplications="false">   

Кстати, приём с location полезен для очень многих случаев. К сожалению, он не работает для configSections.


Добавить комментарий


(Отображает Gravatar)

  Country flag

biuquote
  • Комментарий
  • Предпросмотр
Loading



 
MapYourVisitors.COM