2009年12月9日 星期三

Request.ServerVariables["REMOTE_HOST"] 無法回傳機器名稱

在客戶的環境中, 有一段取client機器名稱的程式碼
Request.ServerVariables["REMOTE_HOST"] 一直無法取得機器名稱,只回傳ip address
但在自已的開發環境卻ok

看到這篇KB 297795

1.打開DOS命令提示字元
2. cd C:\Inetpub\Adminscripts.
3. set w3svc/EnableReverseDNS TRUE

設置了IIS 的EnableReverseDNS 後, 就OK了

KB里頭提到
Warnings
Enabling reverse DNS on your IIS server can affect the performance of your Web server and DNS servers. Some examples are:
Resources such as CPU utilization and network bandwidth may be taken up.
Client requests can take longer to process.
Client requests can be blocked if IP restrictions by DNS domain names are used.

這些警告.....待觀察啊

沒有留言:

張貼留言

publish error allowDefinition='MachineToApplication'

一個老舊的aspx web form專案,調了一些功能建置成功,但進行部署時顯示以下錯誤。 在應用程式層級之外使用註冊為 allowDefinition='MachineToApplication' 的區段發生錯誤。錯誤的原因可能是虛擬目錄尚未在 IIS 中設定為...