The IIS7.5 configuration custom suffix ASP file cannot perform the solution that always prompts for download

  • 2020-05-15 02:54:20
  • OfStack

The configuration on IIS6 is simple. For example, I have customized the ASP suffix to.do. On IIS6, only the corresponding handler mapping needs to be added
Copy the.asp configuration and create a.do configuration. Once configured, you can execute.do. No problem.

Now in IIS7.5, I can't configure it to work.
Add handler mapping, add MIME, nothing works. I don't know why IIS is so troublesome after upgrade.


Two days ago, I also moved the site from IIS6.0 to IIS7.5, and found the same problem with the landlord. I would like to share a solution.
------------------------------
1. Install IIS 7.5;
2. Publish the site and delete the web.config file in the root directory of the original site;
3. Configure the site, such as ASP enabling the parent directory, ASP maximum request entity principal limit, handler mapping... And so on;
4, the text editor opens the new web.config:


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <httpErrors>
      <remove statusCode="500" subStatusCode="-1" />
      <error statusCode="500" prefixLanguageFilePath="\inetpub\custerr" path="500-100.asp" responseMode="File" />
    </httpErrors>
    <directoryBrowse enabled="false" />
    <defaultDocument>
      <files>
        <clear />
        <add value="index. New suffixes " />
        <add value="default. New suffixes " />
      </files>
    </defaultDocument>
    <handlers>
      <add name="ASP- New suffixes " path="*. New suffixes " verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="File" requireAccess="Script" />
    </handlers>
  </system.webServer>
</configuration>

(note: the verb verb1 must be large, requireAccess should be changed to script mode, i.e. "Script", save web.config and restart the site.


Related articles: