2

I have three systems running on IIS7 with static IP address 192.168.66.5. I have configured the system to run on the same IP address with different ports and subdmain like;

  1. 192.168.66.5:81 hostname ams.tpf.go.tz

  2. 192.168.66.5:82 hostname gmis.tpf.go.tz

  3. 192.168.66.5:83 hostname records.tpf.go.tz

  4. 192.168.66.5:84 hostname cmis.tpf.go.tz

I configure all these on IIS7 and defined them in the router.
When the client opens ams.tpf.go.tz without specifying the port number, the error 404 is returned: the requested resource is not found.

bosnjak
  • 8,424
  • 2
  • 21
  • 47
user3455746
  • 21
  • 1
  • 1
  • 2
  • Did you try to put any files in the folder, such as an index.html? Have you checked your logs? Please post them here. – Rob Mar 24 '14 at 14:18

7 Answers7

12

This recently occurred to me also - make sure your IIS Website is started - mine had been stopped. This is the error I was receiving in Visual Studio:

Unable to start debugging on the web server. The web server could not find the requested resource.

Right Click on your Website (i.e. Default Website) in IIS Manager and click Manage Web Site --> Start.

Navigating to any applications in the IIS Website was showing this error:

HTTP Error 404. The requested resource is not found.

SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
  • 2
    If the web site you are trying to access is located under an other one. The parent web site must be started too. – Muffun Jul 21 '16 at 16:05
2

The easiest way to achieve this is to set the port 80 for the site you want to be the "default" one, since this is the default HTTP port.

bosnjak
  • 8,424
  • 2
  • 21
  • 47
2

Some times IIS Manager -> Manage Web Site -> Start, will not work if the below 2 services are not running 1. Windows Activation Technologies Service 2. World Wide Web Publishing Service

Start these services manually under windows services then start IIS again.

debiprasad
  • 21
  • 1
1

Another cause that happens to me with some frequency is to set the permissions correctly to the physical directory. It can be achieved going to IIS -> clicking on the website and then in the actions panel click over Edit Permissions. Be sure that the user you are going to assign the permissions, are the same as defined on Authentication -> Anonymous Authentication or ASP.NET Impersonation, if any of those authentication methods are enabled.

To know the user assigned on those authentication methods, go to the Authentication icon, select any of the authentication methods mentioned before, right click on it and select edit. After that, you have the option to select the user you want.

Hoping this helps.

George
  • 35
  • 1
  • 10
0

My issue for anyone else that comes here from google. I am hosting a django website so in my webconfig file it is set to process requests using the python virtual environment. In the web.config file it is this portion:

<configuration>
    <system.webServer>
        <handlers>
            <add name="Python FastCGI"
                 path="*"
                 verb="*"
                 modules="FastCgiModule"
                 scriptProcessor="C:\inetpub\wwwroot\receipts\venv\Scripts\python.exe|C:\inetpub\wwwroot\receipts\venv\Lib\site-packages\wfastcgi.py"
                 resourceType="Unspecified"
                 requireAccess="Script" />
        </handlers>
        ...
</configuration>

When there was requests to the media folder IIS would say great I know what to do send it through the scriptProcessor (python processor). Requests to the media folder should not do that they only need to serve static files (no extra processing). I placed this web.config in the media directory and it solved my problem!

<configuration>
    <system.webServer>
        <handlers>
            <!-- this configuration overrides the FastCGI handler to let IIS serve these static files -->
            <clear />
            <add name="StaticFile" 
                path="*"
                verb="*"
                modules="StaticFileModule"
                resourceType="File"
                requireAccess="Read" />
        </handlers>
    </system.webServer>
</configuration>
Daniel Butler
  • 3,239
  • 2
  • 24
  • 37
0

In my case IIS server and resolved with the below steps.

  1. Check the security groups - whether we have opened the required ports from ALB SG to EC2 SG.
  2. Login to server and check does IIS server's default site has 443 port opened if your health-check is on 443. (whatever port you are using for health checks).

Use the curl command to troubleshoot the issue.

  1. If you would like to check on HTTPS use the below command to check the response. Use -k or --insecure to ignore the SSL issue.

    curl https://[serverIP] -k

  2. For HTTP test use the below command.

    curl http://[serverIP]

Aditya Y
  • 651
  • 6
  • 12
0

You get this error when the website itself (not app pool) is stopped. As others pointed out, you can start the website using the IIS GUI, but you can also script it with the IISAdministration module in an elevated session like this:

Import-Module IISAdministration
Get-IISSite | 
  Where-Object { $_.State -eq 'Stopped' } | 
  ForEach-Object { $_.Start() }

See Also: How can I stop and start individual websites in IIS using PowerShell?

KyleMit
  • 30,350
  • 66
  • 462
  • 664