help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

KB10058: "File or directory not found" error returned by IIS 7

When you try to open an existing AxCMS page, you have "File or directory not found" error

SYMPTOMS

When you try to open an existing AxCMS page, you have "File or directory not found" error returned by IIS 7

CAUSE

CMS extension under <system.webServer> tags in web.config is not mapped.

IIS 5/6 uses IIS Configuration Manager tool for mapping custom extensions. Since IIS 7 all custom extension are kept in web.config file. You can see how you are able to configure custom extension in our IIS7 installation guide.

SOLUTION

AxCMS 5-8 versions:

Older AxCMS versions are only runnable under Classic Application Pool.

Go to IIS manager, click from the left side Application Pools and you will see the list of your Application Pools. You have to use for your sites only these ones, which have Managed Pipeline Mode = Classic

After go to your IIS Web Site Advanced Settings where you are able to change the Application Pool

The last step is to define your custom extension in web.config file.

For LS.web.config use the next mapping:

  <system.webServer>
  <validation validateIntegratedModeConfiguration="false" />
  <handlers>
   <add name="CMSHttpHandler-Classic64" path="*.AxCMS" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
   <add name="CMSHttpHandler-Classic32" path="*.AxCMS" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
   <add name="RSSHandler-Classic64" verb="*" path="*.rss" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
   <add name="RSSHandler-Classic32" verb="*" path="*.rss" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
  </handlers>
  <modules>
   <add name="AxCMSHttpModule" type="Axinom.AECMS.HttpHandler.LiveHttpHandler" />
   <remove name="Session" />
   <add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="" />
   <remove name="FormsAuthentication" />
   <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" preCondition="" />
  </modules>
 </system.webServer>

For MS.web.config use the next mapping:

 <system.webServer>
  <validation validateIntegratedModeConfiguration="false" />
  <handlers>
   <add name="CMSHttpHandler-Classic64" path="*.AxCMS" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
   <add name="CMSHttpHandler-Classic32" path="*.AxCMS" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
  </handlers>
 </system.webServer>

AxCMS 9 versions:

AxCMS 9 is able to work under the both classic and integrated application pools.

Here are the correct mappings for web.config:

For LS.web.config use the next mapping:

  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="CMSHttpHandler-Classic64" path="*.AxCMS" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
      <add name="CMSHttpHandler-Classic32" path="*.AxCMS" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
      <add name="CMSHttpHandler" path="*.AxCMS" verb="*" type="System.Web.UI.PageHandlerFactory" resourceType="Unspecified" preCondition="integratedMode" />
      <add name="RSSHandler-Classic64" verb="*" path="*.rss" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
      <add name="RSSHandler-Classic32" verb="*" path="*.rss" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
      <add name="RSSHandler" verb="*" path="*.rss" type="PremiumSample.BL.PremiumSampleHandler, PremiumSample.BL" resourceType="Unspecified" preCondition="integratedMode" />
    </handlers>
    <modules>
      <add name="AxCMSHttpModule" type="Axinom.AECMS.HttpHandler.AxCMSHttpModule" />
      <remove name="Session" />
      <add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="" />     
      <remove name="FormsAuthentication" />
      <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" preCondition="" />
    </modules>
  </system.webServer>

 For MS.web.config use the next mapping:

  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="CMSHttpHandler-Classic64" path="*.AxCMS" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
      <add name="CMSHttpHandler-Classic32" path="*.AxCMS" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
      <add name="CMSHttpHandler" path="*.AxCMS" verb="*" type="Axinom.AECMS.HttpHandler.CMSHttpHandler" resourceType="Unspecified" preCondition="integratedMode" />
      <add name="ScriptResource.axd" path="ScriptResource.axd" verb="*" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" resourceType="Unspecified" preCondition="integratedMode" />
      <add name="AppService.axd" verb="*" path="*_AppService.axd" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" resourceType="Unspecified" preCondition="integratedMode"/>
    </handlers>
  </system.webServer>

APPLIES TO

AxCMS.net versions: All versions

IIS version: 7.x