3

I configured a website (DotNetNuke website) on IIS 8.5 having Windows Server 2012 R2 operating system on port 85. I accessed the website using http://localhost:85 and the website worked well. Then, I added another binding to the website in IIS with respect to IP address so that I could access it as 192.168.5.187:85. However, I am unable to access it via the IP address as I get an error page. Specifically, I get a "404 Not Found error page".

On further investigation, I found that the website works on only one port - 85. Whenever I change the binding to point to a different port, the website doesn't work(gives a 404 Not Found error). The current site binding is

IP Address      Port
    *            85

and the website works fine. If I change this binding to

IP Address      Port
     *           83 (infact anything other than 85)

the website doesn't work.(gives a 404 Not Found error)

To summarize:

  1. The website does not work when I add a binding having the IP address. (gives a 404 Not Found error)

  2. The website does not work on any port other than 85 when using localhost. (gives a 404 Not FOund error)

I am having a hard time understanding this so can somebody help me out as I need this website to be accessible via the IP address.

James
  • 363
  • 2
  • 4
  • 16
Satwik Nadkarny
  • 153
  • 2
  • 7

3 Answers3

4

After adding the corresponding bindings to IIS, since DNN supports multiple portals under the same installation and same IIS application, the bindings must be specified on DNN as well. Otherwise each request, while being served by DNN, will end in a 404 error.

To setup the bindings at DNN level, the portal aliases (bindings) can be specified by following the menu "Host > Site Management" and then editing the Portal Aliases section. To add a portal alias check http://www.dnnsoftware.com/wiki/page/portal-alias

Note that if you add another port different from what you used to install DNN the first time, and the "Auto Add Site Alias" setting is not enabled, after adding the IIS binding you also need to add a new portal alias using that port. The portal alias, in your case, would be "localhost:83". This is because while the "Auto Add Site Alias" is enabled by default, if you manually disabled the option or created a second portal, no automatic portal aliases are added.

Also remember to clear the local cache (menu "Tools > Clear Cache") because the portal aliases are cached once the application is initialized. When adding/removing portal aliases the cache is automatically cleared, but depending on certain "webfarm/cachingProvider" scenarios can be tricky.

Hope this helps!

  • Your answer points in the right direction. However, it doesn't explain the why and how. So, anyone coming across this issue in the future will remain confused as to why and how this occurs. – Satwik Nadkarny Jan 07 '15 at 16:58
  • I have answered the why and how in my answer and hence have marked it as the correct answer. However, if you were to explain this in further detail, so as to be a complete and consistent answer, I'd be glad to delete my answer and mark your's instead!! – Satwik Nadkarny Jan 07 '15 at 17:01
  • Thanks Satwik, I have improved the answer clarifying why it "seems" that fails to add the portal alias. Instead of failing, is a known behaviour if you have multiple portals under the same installation, and that can be your case. – David Rodriguez Jan 08 '15 at 20:11
1

To anyone who comes across this problem, here's the solution:

Whenever you add a new binding to a website, the PortalAlias table is updated in the database. This is something that is done automatically by DNN. When a webpage request is recieved by DNN it checks the domain url of the webpage against the addresses stored in the PortalAlias table and only then processes the webpage. If the domain url and the addresses do not match, then either 403 or 404 HTTP errors are provided as output.

However, sometimes DNN fails to do add a binding automatically. Hence, if your webpage is not working on a particular IIS binding, please begin by checking the PortaAlias table in the corresponding database.

Hope that helps!!!

Satwik Nadkarny
  • 153
  • 2
  • 7
0

There may be another application already using the other ports you tried. Open a command-prompt and run 'netstat -a' and add the output to your question so we can diagnose what is going on.

James
  • 363
  • 2
  • 4
  • 16