复合C1不生成sitemap.xml

时间:2015-02-21 15:25:13

标签: sitemap c1-cms

快速规格:
复合C1 4.1
Windows 2003 Server
IIS 6
.NET Framework 4.0
任何更新的东西都不会在我的旧服务器上运行。

我试图访问我的网站的sitemap.xml (direct link),但它一直出现404错误。我查看了互联网,但我唯一能找到的关于站点地图的是复合的manual page,告诉我要更改我的web.config,所有这些都应该解决,它会为我生成一个sitemap.xml。然而,对我来说情况并非如此,我错过了什么?到目前为止,我检查了以下内容:

  • IIS中的404页面引用/Renderers/FileNotFoundHandler.ashx
  • system.web和sytem.webserver(我记得后者对IIS6没用)两者都有手册中公布的设置
  • Composite C1在服务器上拥有正确的权限
  • robots.txt具有对sitemap的正确引用
  • 自定义错误模式设置为仅限远程,我正在远程访问它。
  • 无法在可用包中找到Composite.AspNet.SitemapHandler包



<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<!-- Hey Dev! Changing or removing existing elements in this file may cause functionality in Composite C1 to break -->
  <system.web>
    <trust level="Full" />
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
    <customErrors mode="RemoteOnly">
      <error statusCode="404" redirect="Renderers/FileNotFoundHandler.ashx" />
		</customErrors>
		<compilation debug="false" optimizeCompilations="false">
			<assemblies>
				<add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
				<add assembly="System.Workflow.ComponentModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
				<add assembly="System.Workflow.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
				<add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
			</assemblies>
      <buildProviders>
        <add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor" />
      </buildProviders>
		</compilation>
		<httpRuntime relaxedUrlToFileSystemMapping="true" requestPathInvalidCharacters="&lt;,&gt;,*,%,&amp;,\,?" /> <!-- colon removed from @requestPathInvalidCharacters -->
		<xhtmlConformance mode="Strict" />
		<trace enabled="false" traceMode="SortByTime" requestLimit="100" writeToDiagnosticsTrace="false" pageOutput="true" />
		<pages clientIDMode="AutoID">
      <controls>
        <add tagPrefix="f" namespace="Composite.Plugins.PageTemplates.MasterPages.Controls.Functions" assembly="Composite" />
        <add tagPrefix="c1" namespace="Composite.Plugins.PageTemplates.MasterPages.Controls.Rendering" assembly="Composite" />
      </controls>
    </pages>
		<!--  IIS6 & IIS7 Clasic mode -->
		<httpModules>
			<add name="ApplicationOfflineCheck" type="Composite.Core.Application.ApplicationOfflineCheckHttpModule, Composite" />
			<add name="AjaxResponseHandler" type="Composite.Core.WebClient.Ajax.AjaxResponseHttpModule, Composite" />
			<add name="CompositeAdministrativeResponseFilter" type="Composite.Core.WebClient.HttpModules.AdministrativeResponseFilterHttpModule, Composite" />
			<add name="CompositeAdministrativeAuthorization" type="Composite.Core.WebClient.HttpModules.AdministrativeAuthorizationHttpModule, Composite" />
			<add name="CompositeRequestInterceptor" type="Composite.Core.WebClient.Renderings.RequestInterceptorHttpModule, Composite" />
			<add name="CompositeAdministrativeDataScopeSetter" type="Composite.Core.WebClient.HttpModules.AdministrativeDataScopeSetterHttpModule, Composite" />
			<add name="CompositeAdministrativeCultureSetter" type="Composite.Core.WebClient.HttpModules.AdministrativeCultureSetterHttpModule, Composite" />
		</httpModules>
		<caching>
			<outputCacheSettings>
				<outputCacheProfiles>
					<add name="C1Page" duration="60" varyByCustom="C1Page" varyByParam="*" />
				</outputCacheProfiles>
			</outputCacheSettings>
		</caching>
    <httpHandlers>
      <add verb="GET" path="sitemap.xml" type="Composite.AspNet.SiteMapHandler, Composite" />
    </httpHandlers>
    <siteMap defaultProvider="CompositeC1">
      <providers>
        <add name="CompositeC1" type="Composite.AspNet.CompositeC1SiteMapProvider, Composite" />
      </providers>
    </siteMap>
  </system.web>
	<system.codedom>
		<compilers>
			<compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/warnaserror-" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
				<providerOption name="CompilerVersion" value="v4.0" />
			</compiler>
			<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" compilerOptions="/optioninfer+" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
				<providerOption name="CompilerVersion" value="v4.0" />
			</compiler>
		</compilers>
	</system.codedom>
	<!-- IIS7 Intergrated mode configuration -->
	<system.webServer>
		<validation validateIntegratedModeConfiguration="false" />
		<modules runAllManagedModulesForAllRequests="true">
			<remove name="UrlRoutingModule"/>
			<add name="ApplicationOfflineCheck" type="Composite.Core.Application.ApplicationOfflineCheckHttpModule, Composite" />
			<add name="AjaxResponseHandler" type="Composite.Core.WebClient.Ajax.AjaxResponseHttpModule, Composite" />
			<add name="CompositeAdministrativeResponseFilter" type="Composite.Core.WebClient.HttpModules.AdministrativeResponseFilterHttpModule" />
			<add name="CompositeAdministrativeAuthorization" type="Composite.Core.WebClient.HttpModules.AdministrativeAuthorizationHttpModule, Composite" />
			<add name="CompositeRequestInterceptor" type="Composite.Core.WebClient.Renderings.RequestInterceptorHttpModule, Composite" />
			<add name="CompositeAdministrativeDataScopeSetter" type="Composite.Core.WebClient.HttpModules.AdministrativeDataScopeSetterHttpModule, Composite" />
			<add name="CompositeAdministrativeCultureSetter" type="Composite.Core.WebClient.HttpModules.AdministrativeCultureSetterHttpModule, Composite" />
			<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
		</modules>
		<handlers>
      <add name="SiteMap" verb="GET" path="sitemap.xml" type="Composite.AspNet.SiteMapHandler, Composite" />
			<add name="Wildcard ASP.NET mapping" preCondition="classicMode,runtimeVersionv4.0,bitness32" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" />
			<add name="Wildcard ASP.NET mapping (x64)" preCondition="classicMode,runtimeVersionv4.0,bitness64" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" />
			<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
		</handlers>
    <staticContent>
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
    </staticContent>
    <urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" />
  </system.webServer>
  <system.serviceModel>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
</configuration>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:1)

multiple hostname bindings与相同的HomePageId和文化结合使用时,我的站点地图出错:/

这可能与您的问题相同或不同,但这正是我在所有环境中使用相同配置(404页面等)所做的工作:

multiple hostname bindings

允许错误详情,这就是我得到的:

error details

源代码可在https://compositec1.codeplex.com/SourceControl/latest#CompositeC1/Composite/AspNet/SiteMapHandler.cs获得 - 这就是我如何“解决”我的问题的方法。

我的网站现在非常好,所以我可以自信地在App_Data\Composite\DataStores\Composite.Data.Types.IHostnameBinding.xml中注释掉我的非生产条目,这使我再次使用功能完善的站点地图生成器:]

我尝试通过更改文化(例如非默认文化,或更改字符串的大小)或HomePageId(例如非主页的ID)来“欺骗”错误功能,但是,我遇到了其他一些问题:\