2

Windows Server 2012 R2 / IIS 8.5

In IIS > Sites > Default Website I have an (ASP) application, when I visit the localhost URL a file is downloaded instead of the page being displayed.

The files are located at C:\inetpub\wwwroot\rooms and within this folder there are various .dll files, folders and a web.config. The contents of the web.config are;

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <directoryBrowse enabled="false" />
        <handlers accessPolicy="Read, Execute, Script">
            <remove name="ISAPI-dll" />
            <add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" scriptProcessor="C:\inetpub\wwwroot\rooms\rooms.dll" resourceType="File" requireAccess="Execute" allowPathInfo="true" preCondition="bitness32" />
        </handlers>
        <defaultDocument enabled="true">
            <files>
                <add value="rooms.dll" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

I have set the Default Document in IIS to the relevant .dll file, this is what's being downloaded when I visit localhost/rooms

I have restarted the IIS server and the site itself a few times. There are other sites hosted on the same server and they are working as expected and accessible via a similar URL. I've also tried various browsers.

I have checked windows features and roles and can confirm that ASP.NET 3.5 and ASP.NET 4.5 are displaying as (Installed), as is the ISAPI Extensions and ISAPI Filters.

I have very little experience with IIS or ASP.

  • Why is the application being downloaded rather than displayed?
  • How can I begin to troubleshoot this?
TheOrdinaryGeek
  • 429
  • 1
  • 4
  • 13

1 Answers1

1

For us it was a binding issue. If you open IIS and right click the website and look at binding properties it will list all the names and how it will treat the files.

There were two entries we needed to delete:

type                 host  port       binding
------------------------------------------------
net.msmq                              localhost*
msmq.formatname                       localhost*

The remaining binding that needed to stay was:

type    host      port                 binding
------------------------------------------------
http              80                        

When hostname is blank, it means it will match anything- however because the two entries were there catching queries to localhost first, it never was able to handle the request as type http.

Kyle Burkett
  • 111
  • 3