2011-12-21 215 views
0

我創建了一個應用程序,並將其發佈到我的服務器上。我想,當用戶瀏覽到要設定這麼IE瀏覽器無法導航到default.htm

appName.domainName.com

,他們將被自動重定向到

appName.domainName.com/myApplication.aspx

我我已經使用重定向元標記在我的根目錄中設置了Default.htm文件。但是,如果我將頁面設置爲我的主頁,則每當我第一次打開IE時,就會收到「Interent Explorer無法顯示網頁」消息。一旦我打F5它刷新並正常工作。有沒有人知道可能導致這種情況的線索?

回答

0

一種選擇是將IIS配置爲在導航到應用程序時使用myApplication.aspx作爲「默認頁面」,而不是基於以前的默認頁面進行重定向。

使用IIS documentation,你可以添加到您的web.config

<configuration> 
    <system.webServer> 
     <defaultDocument enabled="true"> 
     <files> 
      <add value="myApplication.aspx" /> 
     </files> 
     </defaultDocument> 
    </system.webServer> 
</configuration> 

或使用IIS管理器的值設置爲你的頁面。