Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vincent DeCapite 64 posts 83 karma points
    Sep 07, 2010 @ 22:58
    Vincent DeCapite
    0

    Umbraco Sitemap iis7 Troubles

    I am having some troubles getting the sitemap to work on our new windows 2008 server with IIS7.

    This is my web.config file:

    <?xml version="1.0" encoding="utf-8"?>

    <configuration>

    <configSections>

    <section name="urlrewritingnet" restartOnExternalChanges="true" requirePermission="false" type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter" />

    <!-- ASPNETAJAX -->

    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

    <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />

    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

    </sectionGroup>

    </sectionGroup>

    </sectionGroup>

    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

    <section name="umbraco.presentation.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

    </sectionGroup>

    </configSections>

    <urlrewritingnet configSource="config\UrlRewriting.config" />

    <appSettings>

     

    <add key="umbracoConfigurationStatus" value="4.0.3" />

    <add key="umbracoReservedUrls" value="/config/splashes/booting.aspx,/install/default.aspx,/config/splashes/noNodes.aspx" />

    <add key="umbracoReservedPaths" value="/umbraco,/install/" />

    <add key="umbracoContentXML" value="/data/umbraco.config" />

    <add key="umbracoStorageDirectory" value="/data/umbraco" />

    <add key="umbracoPath" value="/umbraco" />

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

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

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

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

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

    <add key="umbracoTimeOutInMinutes" value="20" />

    <!-- How often should umbraco check for upgrades (in days) -->

    <add key="umbracoVersionCheckPeriod" value="7" />

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

    <add key="umbracoDefaultUILanguage" value="en" />

    <add key="umbracoProfileUrl" value="profiler" />

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

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

    </appSettings>

    <system.net>

    <mailSettings>

    <smtp>

    <!--<network host="127.0.0.1" userName="username" password="password" />-->

    <!--<network host="mail-fwd.att-webhosting.com" />-->

    <network host="relay.jangosmtp.net" port="25" userName="it-usendoscopy" password="123567FV" />

    <!--<network host="mx.usendoscopygroup.com" userName="usend1" password="!12345a" />-->

    </smtp>

    </mailSettings>

    </system.net>

    <!-- REMOVE FOR BETA -->

    <!-- added by NH to test foreign membership providers-->

    <connectionStrings>

    <remove name="LocalSqlServer" />

    <add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=C:\USERS\HARTVIG\DOCUMENTS\VISUAL STUDIO 2005\WEBSITES\AJAXENABLEDWEBSITE2\APP_DATA\ASPNETDB.MDF;Integrated Security=True" providerName="System.Data.SqlClient" />

    </connectionStrings>

    <system.web>

    <httpRuntime executionTimeout="1200" maxRequestLength="512000" /><!-- 500Mb -->

    <!--

    <trust level="Medium" originUrl=".*" />-->

    <customErrors mode="Off" />

    <trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />

    <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />

    <globalization requestEncoding="UTF-8" responseEncoding="UTF-8" />

    <xhtmlConformance mode="Strict" />

    <pages enableEventValidation="false">

    <!-- ASPNETAJAX -->

    <controls>

    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    <add tagPrefix="umbraco" namespace="umbraco.presentation.templateControls" assembly="umbraco" />

    </controls>

    </pages>

    <httpModules>

    <add name="SSLSwitcher" type="WSC.SSLSwitcher, WSC.SSLSwitcher" />

    <add name="_301Redirect" type="WSC._301Redirect, WSC.301Redirect" />

    <!-- URL REWRTIER -->

    <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />

    <add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />

    <!-- UMBRACO -->

    <add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule" />

    <add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule" />

    <!-- ASPNETAJAX -->

    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    </httpModules>

    <httpHandlers>

    <remove verb="*" path="*.asmx" />

    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />

    <!-- UMBRACO CHANNELS -->

    <add verb="*" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />

    <add verb="*" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />

    </httpHandlers>

    <compilation defaultLanguage="c#" debug="true" batch="false">

    <assemblies>

    <!-- ASPNETAJAX -->

    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

    </assemblies>

    </compilation>

    <authentication mode="Forms">

    <forms name="yourAuthCookie" loginUrl="login.aspx" protection="All" path="/" />

    </authentication>

    <authorization>

    <allow users="?" />

    </authorization>

    <!-- Membership Provider -->

    <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">

    <providers>

    <clear />

    <add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="TestType" />

    <!--<add name="AspNetSqlMemberShipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" />-->

    <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />

    </providers>

    </membership>

    <!-- added by NH to support membership providers in access layer -->

    <roleManager enabled="true" defaultProvider="UmbracoRoleProvider">

    <providers>

    <clear />

    <add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" applicationName="umbraco" />

    </providers>

    </roleManager>

    <!-- Sitemap provider-->

    <siteMap defaultProvider="UmbracoSiteMapProvider" enabled="true">

    <providers>

    <clear />

    <add name="UmbracoSiteMapProvider" type="umbraco.presentation.nodeFactory.UmbracoSiteMapProvider" defaultDescriptionAlias="description" securityTrimmingEnabled="true" />

    </providers>

    </siteMap>

    </system.web>

    <!-- ASPNET3.5 CODEDOM-->

    <system.codedom>

    <compilers>

    <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

    <providerOption name="CompilerVersion" value="v3.5" />

    <providerOption name="WarnAsError" value="false" />

    </compiler>

    </compilers>

    </system.codedom>

    <!-- ASPNETAJAX -->

    <system.web.extensions>

    <scripting>

    <scriptResourceHandler enableCompression="true" enableCaching="true" />

    </scripting>

    </system.web.extensions>

    <!--

    The system.webServer section is required for running ASP.NET AJAX under Internet

    Information Services 7.0. It is not necessary for previous version of IIS.

    -->

    <system.webServer>

    <validation validateIntegratedModeConfiguration="false" />

    <modules>

    <!-- Asp.net 3.5 Modules-->

    <remove name="ScriptModule" />

    <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    <!-- UMBRACO modules-->

    <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />

    <add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />

    <add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule" />

    <add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule" />

    <add name="SSLSwitcher" type="WSC.SSLSwitcher, WSC.SSLSwitcher" />

    <add name="_301Redirect" type="WSC._301Redirect, WSC.301Redirect" />

    </modules>

    <handlers>

    <!-- Asp.net 3.5 handlers-->

    <remove name="WebServiceHandlerFactory-Integrated" />

    <remove name="ScriptHandlerFactory" />

    <remove name="ScriptHandlerFactoryAppServices" />

    <remove name="ScriptResource" />

    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    <!-- UMBRACO Handlers -->

    <add verb="*" name="Channels" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />

    <add verb="*" name="Channels_Word" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />

    </handlers>

    <staticContent>

    <mimeMap fileExtension=".3gp" mimeType="video/3gp" />

    </staticContent>

    </system.webServer>

    <!-- Ajax 1.0 Compatibility -->

    <runtime>

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

    <dependentAssembly>

    <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />

    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />

    </dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />

    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />

    </dependentAssembly>

    </assemblyBinding>

    </runtime>

    </configuration>

     

    This is my sitemap xslt

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    <?

     

     

    xml version="1.0" encoding="UTF-8"

    ?>

    <!

     

     

    DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;">

    ]>

    <

     

     

    xsl:stylesheet

     

    version="1.0

    "

     

    xmlns:xsl="http://www.w3.org/1999/XSL/Transform

    "

     

    xmlns:msxml="urn:schemas-microsoft-com:xslt

    "

     

    xmlns:msxsl="urn:schemas-microsoft-com:xslt

    "

     

    xmlns:umbraco.library="urn:umbraco.library

    "

     

    xmlns:scripts="urn:scripts

    "

     

    exclude-result-prefixes="msxml umbraco.library scripts"

    >

    <

     

     

    xsl:output method="xml" omit-xml-declaration="yes" encoding="utf-8" indent="yes"

    />

    <

     

     

    xsl:param name="currentPage"

    />

    <

     

     

    xsl:param name="ignoreAlias" select="/macro/ignoreAlias"

    />

    <

     

     

    xsl:variable name="maxLevelForSitemap" select="6"

    />

    <

     

     

    xsl:variable name="url" select="concat('http://',umbraco.library:RequestServerVariables('HTTP_HOST'))"

    />

    <

     

     

    xsl:variable name="showMeta" select="umbraco.library:RequestQueryString('meta')"

    />

    <

     

     

    msxsl:script language="CSharp" implements-prefix="scripts"

    >

    <![CDATA[

    public double GetPriority(string url)

    {

    int pos=0;

    int count=0;

    while(pos!=-1)

    {

    count++;

    pos = url.IndexOf('/', pos+1);

    }

    double priority = (100 - 20*count)/100.0;

    return priority > 0.1 ? priority : 0.1;

    }

    public string GetChangeFreq(string dateString)

    {

    TimeSpan diff = DateTime.Now - DateTime.Parse(dateString);

    if(diff.Days<1)

    return "hourly";

    if(diff.Days<=2)

    return "daily";

    if(diff.Days<=8)

    return "weekly";

    return "monthly";

    }

    ]]>

    </

     

     

    msxsl:script

    >

    <

     

     

    xsl:template match="/"

    >

    <

     

     

    xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"

    />

    <

     

     

    xsl:choose

    >

    <

     

     

    xsl:when test="$showMeta != ''"

    >

    <

     

     

    xsl:text disable-output-escaping="yes">&lt;urlset&gt;</xsl:text

    >

    </

     

     

    xsl:when

    >

    <

     

     

    xsl:otherwise

    >

    <

     

     

    xsl:text disable-output-escaping="yes">&lt;urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"&gt;</xsl:text

    >

    </

     

     

    xsl:otherwise

    >

    </

     

     

    xsl:choose

    >

    <

     

     

    url

    >

     

    <

     

     

    xsl:if test="$showMeta != ''"

    >

    <

     

     

    xsl:attribute name="level">1</xsl:attribute

    >

    <

     

     

    xsl:attribute name="name"

    >

    <

     

     

    xsl:value-of select="$currentPage/ancestor-or-self::node [@level=1]/data [@alias='siteName']"

    />

    </

     

     

    xsl:attribute

    >

    </

     

     

    xsl:if

    >

    <

     

     

    loc

    >

    <

     

     

    xsl:value-of select="concat($url,'/')"

    />

    </

     

     

    loc

    >

    <

     

     

    changefreq>daily</changefreq

    >

    <

     

     

    lastmod

    >

    <

     

     

    xsl:value-of select="concat($currentPage/ancestor-or-self::node [@level=1]/@updateDate,'+00:00')"

    />

    </

     

     

    lastmod

    >

    <

     

     

    priority>1</priority

    >

    </

     

     

    url

    >

     

    <

     

     

    xsl:call-template name="drawNodes"

    >

    <

     

     

    xsl:with-param name="parent" select="$currentPage/ancestor-or-self::node [@level=1]"

    />

    </

     

     

    xsl:call-template

    >

     

    <

     

     

    xsl:text disable-output-escaping="yes">&lt;/urlset&gt;</xsl:text

    >

    </

     

     

    xsl:template

    >

     

    <

     

     

    xsl:template name="drawNodes"

    >

    <

     

     

    xsl:param name="parent"

    />

    <

     

     

    xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0"

    >

     

    <

     

     

    xsl:for-each select="$parent/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level &lt;= $maxLevelForSitemap and contains(concat($ignoreAlias, ','), concat(./@nodeTypeAlias, ','))=false]"

    >

    <

     

     

    url

    >

     

    <

     

     

    xsl:if test="$showMeta != ''"

    >

    <

     

     

    xsl:attribute name="level"

    >

    <

     

     

    xsl:value-of select="@level"

    />

    </

     

     

    xsl:attribute

    >

    <

     

     

    xsl:attribute name="name"

    >

    <!--

     

     

    Add the display name

    -->

    <

     

     

    xsl:choose

    >

    <

     

     

    xsl:when test="string(./data [@alias='pageNavigationName']) != ''"

    >

    <

     

     

    xsl:value-of select="./data [@alias='pageNavigationName']"

    />

    </

     

     

    xsl:when

    >

    <

     

     

    xsl:otherwise

    >

    <

     

     

    xsl:value-of select="@nodeName"

    />

    </

     

     

    xsl:otherwise

    >

    </

     

     

    xsl:choose

    >

    </

     

     

    xsl:attribute

    >

    </

     

     

    xsl:if

    >

    <

     

     

    loc

    >

    <

     

     

    xsl:value-of select="$url"/><xsl:value-of select="umbraco.library:NiceUrl(@id)"

    />

    </

     

     

    loc

    >

    <

     

     

    lastmod

    >

    <

     

     

    xsl:value-of select="concat(@updateDate,'+00:00')"

    />

    </

     

     

    lastmod

    >

    <

     

     

    changefreq

    >

    <

     

     

    xsl:value-of select="scripts:GetChangeFreq(@updateDate)"

    />

    </

     

     

    changefreq

    >

    <

     

     

    priority

    >

    <

     

     

    xsl:value-of select="scripts:GetPriority(umbraco.library:NiceUrl(@id))"

    />

    </

     

     

    priority

    >

     

    </

     

     

    url

    >

    <

     

     

    xsl:if test="count(./node [string(./data [@alias='umbracoNaviHide']) != '1' and @level &lt;= $maxLevelForSitemap and contains($ignoreAlias, ./@nodeTypeAlias)=false]) &gt; 0"

    >

    <

     

     

    xsl:call-template name="drawNodes"

    >

    <

     

     

    xsl:with-param name="parent" select="."

    />

    </

     

     

    xsl:call-template

    >

    </

     

     

    xsl:if

    >

    </

     

     

    xsl:for-each

    >

    </

     

     

    xsl:if

    >

    </

     

     

    xsl:template

    >

    </

     

     

    xsl:stylesheet>

    Any help would be greatly appreciated.. Nothing will show up on the page when viewed in a browser. But it will show up if it is viewed on the server

Please Sign in or register to post replies

Write your reply to:

Draft