2

ASP.net webforms application, IIS 7.5, https

I added an App_offline.htm file to the root of my test site (same server, different port) and it works perfectly. The test site is accessed via IP and is https but with a self-generated certificate.

I added it to the live site and it works fine while looking at the site via localhost on the server. But on the web, the page displayed is "The specified URL cannot be found" wrapped in a blue box. The live site has third-party verified https certificate. It is also a subdomain, while the test site is not. This happens in all browsers.

I have ensured it is a long enough text page - and of course, it works on the test site.

Any ideas? Is it the subdomain creating the problems?

EDIT - I am fairly certain I figured the issue and it should have been obvious. :-) So my production website is a subdomain - of website residing on a entirely different network. So my IIS sees the app_offline.htm file and sends the message out that the website is unavailable. If this were all taking place on my own server (like it is when I call from localhost) then all would work fine. But the outside server sees my IIS message that things are available and it simply displays its own error page.

So I don't think app_offline.htm will work for me at all.

4

1 に答える 1

1

これはあなたの質問/問題に対する直接的な回答ではないことは承知していますが、web.config でこれを試しましたか?

<system.webServer>
    <httpRedirect enabled="true" destination="http://myurl.com/offline.aspx" />
</system.webServer>
于 2013-06-13T17:32:25.813 に答える