HTTP 404 with ~/Sitemap.aspx

Feb 5, 2013 at 12:32 PM
Hi!
So I deployed the app to my local IIS 8 machine.
First it give an error about the integrated pipeline mode, so I changed the pipeline for the app to Classic 4.5.

Now, no errors, but navigating to http://localhost/proj/sitemap.aspx gives an HTTP 404 ("The resource cannot be found.")

I created an App_Data folder in C:\inetpub\wwwroot\proj and gave Full Control to Everyone thinking that maybe the Sitemap Gen didn't have permissions to write to the directory. It didnt help.

My web.config is as follows:
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <configSections>
    <section name="SubgurimSiteMapConfiguration" type="Subgurim.Controles.SSM.SubgurimSiteMapSectionHandler"/>
  </configSections>
  <SubgurimSiteMapConfiguration>
    <dataPath>~/App_Data/SubgurimSiteMap</dataPath>
    <sitemapResponse>~/sitemap.aspx</sitemapResponse>
    <forbiddenPaths>
      <Path>~/css</Path>
      <Path>~/js</Path>
      <Path>~/Admin</Path>
    </forbiddenPaths>
    <acceptedExtensions>
      <extension>.htm</extension>
      <extension>.html</extension>
    </acceptedExtensions>
  </SubgurimSiteMapConfiguration>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <add name="SubgurimSiteMapContextRequest" type="Subgurim.Controles.SSM.SubgurimSiteMapContextRequest"/>
    </modules>
  </system.webServer>
  <system.web>
    <httpModules>
      <add name="SubgurimSiteMapContextRequest" type="Subgurim.Controles.SSM.SubgurimSiteMapContextRequest"/>
    </httpModules>
    <compilation debug="true" targetFramework="4.0"/>
    <httpRuntime/>
  </system.web>
</configuration>
Developer
Feb 8, 2013 at 9:11 AM
Hi FaizanKazi,
if you try this url ( http://localhost/sitemap.aspx ) as you work?
Feb 8, 2013 at 1:27 PM
lorenzobattaglia wrote:
Hi FaizanKazi,
if you try this url ( http://localhost/sitemap.aspx ) as you work?
Hi Lorenzo,
It works if I debug using Visual Studio (2012) using the Visual Studio Development server.
However it does not work when deployed to IIS.
Dec 30, 2014 at 2:49 PM
Edited Dec 30, 2014 at 2:51 PM
maybe the problem is that you insert both tags for IIS and IIS 7.X,

this is for IIS7.x
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <add name="SubgurimSiteMapContextRequest" type="Subgurim.Controles.SSM.SubgurimSiteMapContextRequest"/>
    </modules>
 </system.webServer>
this is for IIS
 <system.web>
    <httpModules>
      <add name="SubgurimSiteMapContextRequest" type="Subgurim.Controles.SSM.SubgurimSiteMapContextRequest"/>
    </httpModules>
    <compilation debug="true" targetFramework="4.0"/>
    <httpRuntime/>
</system.web>