2012-07-05 153 views
-1

我們有一個在IIS 7上設置的網站,並試圖用新網站替換它。IIS 7將默認網站重定向到自定義頁面

舊網站使用的自定義文件作爲主頁,稱爲WN-main.asp

新網站不再使用ASP,我們想用一個普通index.html作爲主文件。然而,當我們去到網站,它不斷嘗試重新定向我們的.com到.com/WN-main.asp

在IIS的「默認文檔」設置中,我們在頂部有index.html,WN- main.asp沒有在列表中找到(它從來沒有在那裏)。 IIS中的這個重定向在哪裏? :)

我們還從根目錄中刪除了web.config文件,並將整個舊網站放在一個子目錄中。以及重新啓動IIS。任何想法,這個重定向是坐?

謝謝!

+0

要查看實際錯誤,您可以立即訪問http://www.worzalla.com,儘管我們很快就必須恢復舊的ASP網站。 – 2012-07-05 17:01:02

+1

嘿我現在得到這個鏈接404錯誤。這解決了嗎? – DotNetUser 2012-07-09 21:21:47

+0

-1這個問題已解決,應該刪除 – 2012-07-14 20:34:13

回答

0

我們不知道到底是什麼結束了這個問題 - 某處,不知何故,老主頁可能緩存在服務器上,並且頁面本身重定向到/WN-main.asp頁面...即使服務器不應該緩存任何內容,並且我們最初已經檢查過多次。在玩過很多設置後,它突然開始工作了! Grrr微軟。我們禁用並啓用了asp和.net的事實可能有所幫助,但我不確定......至少現在它正在工作!

0

在IIS中,您可以將設置配置爲除網站以外的其他級別,例如,一個machine.config文件,它定義了服務器所有站點的設置。您網站的最終配置不僅會使用您的web.config,還會使用其他父級配置。

檢查這些文件,看是否有定義了這個錯誤<defaultDocument>

Server-level configuration is stored in the following configuration files:  
- Machine.config. This file is located in %windir%\Microsoft.NET\Framework\framework_version\CONFIG.  
- Root Web.config for the .NET Framework. This file is located in %windir%\Microsoft.NET\Framework\framework_version\CONFIG.  
- ApplicationHost.config. This file is located in %windir%\system32\inetsrv\config. 

Site, application, and virtual and physical directory configuration can be stored in one of the following locations:  
- A server-level configuration file. When configuration for a site, application, directory, or URL is stored in a server-level configuration file, you must use a location tag to specify the site, application, directory, or URL to which the configuration applies.  
- A parent-level Web.config file. When configuration for an application, directory, or URL is stored in a parent-level configuration file, you must use a location tag to specify the child at which the configuration applies.  
- The Web.config file for the site, the application, or the directory. When you configure settings for an application, directory, or URL, the configuration is stored in the same directory as the site, application, or directory. You do not need to use location tags. 

摘自:Working with configuration files in IIS7