question: Is initializationPage value limited to calling localhost only?RSS

3 replies

Last post Jun 08, 2016 12:03 AM by carehart

  • question: Is initializationPage value limited to calling localhost only?

    May 10, 2013 12:32 AM|carehart|LINK

    Has anyone else noticed that with the App Init feature, the InitializationPage URL is only ever called on localhost? You can't change it to list any other domain or host-header. It always creates the URL as http://localhost plus whatever is in the initpage value.

    That's just really debilitating if you need the feature to call a page in some other site within the IIS server.

    For more details, see a forum thread I had opened last week with the same question above (but a slightly different subject). I realized only tonight that that there was this forum specific to the App Init feature. That forum thread is:

    http://forums.iis.net/t/1197707.aspx/1?how+to+change+domain+name+used+for+Application+Initialiation+s+initializationPage+value

    And this other question from another writer late last year (in this forum) seems to be reflecting the same problem, though worded differently: http://forums.iis.net/t/1193175.aspx/1?Host+Header+Web+Sites

    Anyone with thoughts? I fear that no one's noticed this problem because most just have been testing/demo'ing the feature, and using localhost was good enough. Add to it the fact that some would have a hard time ever noticing what URL is generated, and it's all the more apparent to my why few have complained of this--and that perhaps many complaining "it doesn't work" are just suffering from this very problem.

    /charlie
  • Re: question: Is initializationPage value limited to calling localhost only?

    Sep 28, 2013 10:09 PM|wjchristenson2|LINK

    Charlie - did you ever figure this out?  I've been beating my head against the wall as to why the module is not calling my /AppInit page and I think it's related to your findings.  I am hosting 4 websites, each having their own domain, and the module does not call my initializationPage.  The module works for the "Starting.htm", so I know I have the module installed right.  I have logging wired up in the /AppInit, so I know for a fact it's not being called.

    I've specified the hostName element thinking that should help clear it up, but it doesn't...

    <applicationInitialization remapManagedRequestsTo="Starting.htm" skipManagedModules="true">
    <add initializationPage="/AppInit" hostName="mydomain.com"/>
    </applicationInitialization>

    /Bill
  • Re: question: Is initializationPage value limited to calling localhost only?

    Sep 28, 2013 11:23 PM|wjchristenson2|LINK

    Charlie, I figured it out.  The code I mentioned above should do the trick with not calling localhost.  Specify the hostName and that should work.  It appears the module takes the host name and prepends http:// then appends the page.

      <system.webServer>
        <applicationInitialization remapManagedRequestsTo="Starting.htm" skipManagedModules="true">
          <add initializationPage="/AppInit" hostName="mysubdomain.mydomain.com"/>
        </applicationInitialization>
      </system.webServer>

    The reason why I thought the page was not being called was because I wasn't using the hostName correctly and then my logging utility had a bug.  I'll report back if I find anything else.

    /Bill
  • Re: question: Is initializationPage value limited to calling localhost only?

    Jun 08, 2016 12:03 AM|carehart|LINK

    Bill, thanks so much for that, and really sorry that I somehow missed this until now. It is indeed just the right answer, and I really appreciate your sharing it, and I hope to find ways to share it with others.

    /charlie