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.

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

沒有留言:

張貼留言

離線安裝SSMS 22 launched extracted application exiting with result code 0x138b

SSMS 22 安裝器下載頁面 https://learn.microsoft.com/zh-tw/ssms/install/install https://aka.ms/ssms/22/release/vs_SSMS.exe 將安裝檔下載到本機,檔案好大2.5G  https:...