I am using IIS 7 on Windows 2008 Server for an ASP.NET 4 application using Bootstrap. The server has a private IP address to use at work, but is also accessible through a public IP address from outside. Our Internet access provider does the forwarding for us. The server is also running the F-Secure antivirus system.

When I browse the web site from the server itself, using either the private IP or the public one, it works fine. But when I use a remote client (using the public IP, obviously), it works randomly. A typical scenario goes like this:

  1. I type the web site URL on my browser. I get home page.
  2. I click on a link to navigate to another page. I get an INET_E_RESOURCE_NOT_FOUND error.
  3. I hit refresh on the browser. I get the page.
  4. I click on another link. I get the page.
  5. I click on another link. I get an INET_E_RESOURCE_NOT_FOUND error.

And so on and so forth. It is apparently random. Sometimes the server returns the page, sometimes I get the INET_E_RESOURCE_NOT_FOUND error. It happens from every client I have tried, from Edge on a Windows 10 machine to Safari on an iPhone.

Some other times, the server fails to deliver the home page when I first browse to it from a client computer. I retry a few times to no avail. And then, after perhaps 5 or 10 refreshes, I get the page. And from that point on, it works OK until, eventually, it fails again.

As far as I understand, INET_E_RESOURCE_NOT_FOUND does not mean that a page was not found (that would be a 404), but that the server could not be found. It is usually associated with a DNS or proxy error.

I have been looking at IIS log files. As far as I can see, sometimes logging gets interrupted with entries such as this one:

GET /fonts/glyphicons-halflings-regular.woff - 80 - Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/52.0.2743.116+Safari/537.36+Edge/15.15063 404 3 50 78

Apparently, the client is trying to get a fonts file and the server returns a 404 error. The font file is on the server in the right folder, so I am not sure why it's failing to find it.

EDIT. I have now fixed the issue with the font file (which was due to a missing MIME type entry on IIS), but the random INET_E_RESOURCE_NOT_FOUND errors remain. The 404 with the font file is likely to be a red herring.

EDIT. I have another issue with this same web site, which may be related. Please see here: https://stackoverflow.com/questions/43814006/smtpexception-in-asp-net-application-with-remote-browser

Any ideas? Thanks.

  • How many network interfaces are in your server? And is the public IP address assigned to a NIC on your server, or to one on the ISP's router? May 9 '17 at 19:13
  • Only one NIC. The public IP address is not on the server, but on our Internet access provider's routers. They do the forwarding for us.
    – CesarGon
    May 10 '17 at 22:31

You said that the ISP is doing the forwarding for you, which suggests that they are proxying/port-forwarding to an internal IP and that your server only has one IP address (likely a private one).

If this is true, then it sounds like their proxy server is having issues connecting to your IIS server (for any number of reasons) and is the one returning the error. I would ask the provider to check the logs on their router/firewall to see whether this is the case.

  • After much investigation, we have found the root problem. Our Internet access provider found a configuration error in the NAT tables that mapped the public IP address to our server's internal IP address. This caused some requests to be dropped. They have fixed the configuration and things work well now. Thanks to all who helped with this.
    – CesarGon
    May 11 '17 at 13:38

Assuming you get this error directly in your browser, rather than it being returned by the proxy server, you can test whether it is caused by DNS issues by adding an entry in your hosts file (%windir%\System32\drivers\etc\hosts in Windows; you'll need to edit it as administrator) to associate the public IP address of your web site with its DNS entry). If you do this, and test the public web site, and you still get the same errors, it's not a DNS problem, and you can start looking at the proxy server configuration. (Remember to remove the entry after testing!)

  • I am trying this. So far, I have had no errors.
    – CesarGon
    May 6 '17 at 23:58
  • 1
    That would suggest that the problem is with DNS resolution. That is quite unusual, given that you've indicated that you have tried accessing the web site from different network locations. You can run tests against them by using the nslookup command on Windows (or dig if you're using Linux). Run the query multiple times and see if you get any failures to return anything. If you do, I would suggest contacting your DNS provider about it. (If you're running your own DNS server for the web site, you'll need to look at why its intermittently not returning any data for the DNS entry).
    – Pak
    May 7 '17 at 0:27
  • Just got some errors. :-( They appear to be random as before.
    – CesarGon
    May 7 '17 at 1:12
  • If you had errors with the hosts file entry in place, then you have a very weird error not associated with DNS. When you get the errors, do they take a long time to return the error, or is the error returned immediately? Can you run Wireshark on the PC you're browsing from to capture the packets to and from the server (and any DNS packets), to see what the error might be? It sounds like perhaps something in the network path is randomly (and possibly deliberatly) dropping packets. (You can download Wireshark from wireshark.org if you haven't already got it installed.)
    – Pak
    May 7 '17 at 17:01
  • The errors take a longish time (10 seconds?). I will definitely try Wireshark and I'll get back to you. Thanks.
    – CesarGon
    May 7 '17 at 18:50

I would suspect that your mime types are not set correctly. I would suggest you add it explicitly as part of your server config.

Others have had this issue before: https://stackoverflow.com/questions/4015816/why-is-font-face-throwing-a-404-error-on-woff-files

  • This has removed the 404 error for the font file, but the random errors remain.
    – CesarGon
    May 5 '17 at 13:17
  • Are the same transition pages offering the same error or does it happen on the same transition each time? If so, check if the fonts are being accessed consistently in the code. Check your relative links traversing from the wrong start point. As a secondary check host the file somewhere else and try that.
    – DarkSheep
    May 5 '17 at 15:47
  • The font file is not causing an error anymore. I think it was a red herring.
    – CesarGon
    May 5 '17 at 21:25
  • Also, when I try to browse to the server and I get an error, IIS registers no log entry at all. This is consistent with the fact that INET_E_RESOURCE_NOT_FOUND refers to a DNS or proxy problem. But why the randomness?
    – CesarGon
    May 5 '17 at 21:48
  • If it is working on some pages then you might have some caching issues causing the randomness. Check with a private window in your browser and then close it for the next test. Alternatively check your browser for 304s being successful. Things are going to work if they are already in your session Edit to add link developers.google.com/web/fundamentals/performance/…
    – DarkSheep
    May 6 '17 at 22:19

1st thing. is the server updates up to date?. Check the version of .net in the server and get it up to date.

Make sure that all the ports that the app uses are being forwarded for your isp

Also, check your Server Logs with this https://gallery.technet.microsoft.com/scriptcenter/Get-event-logs-errors-and-6871f163

Check for the most frequent errors and check if it's related.

  • Thanks. The server is up to date, and the only port in use is the standard 80 for HTTP. I'll have a look at the server logs ASAP.
    – CesarGon
    Apr 22 '17 at 11:56
  • Make sure that you have all the necessary .net version available for the server (the ones that your web app needs) Apr 22 '17 at 18:14
  • I have them. If I didn't, the web site would fail all the time, rather than randomly. ;-)
    – CesarGon
    Apr 23 '17 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.