天天看點

解決IIS7運作ASP提示錯誤:An error occurred on the server when processing the URL

    在WINDOWS7或SERVER2008上安裝了IIS7,調試ASP程式時出現以下錯誤:

    An error occurred on the server when processing the URL. Please contact the system administrator

    解決方法如下:

    設定方法一:

    以管理者身份運作CMD,将目錄定位到%windir%/system32/inetsrv/,然後執行appcmd set config -section:asp -scriptErrorSentToBrowser:true。

%windir%/system32/inetsrv/appcmd set config -section:asp -scriptErrorSentToBrowser:true      

    設定方法二:

    打開IIS7的asp設定,展開“調試屬性”選項,“将錯誤發送到浏覽器”這項預設的是False,改為True,然後點右側的應用!如圖所示:

    通過以上設定後,再從浏覽時打開出錯ASP頁面時就能看到頁面出錯的詳細資訊,方使調試。如果是公開的Web伺服器建議不要打開此選項,以防出錯資訊被他人利用。

    在WINDOWS7或SERVER2008上安裝了IIS7.5,調試ASP程式時出現以下錯誤:

    An error occurred on the server when processing the URL. Please contact the system administrator

    解決方法如下:

    設定方法一:

    以管理者身份運作CMD,将目錄定位到%windir%/system32/inetsrv/,然後執行appcmd set config -section:asp -scriptErrorSentToBrowser:true。

    %windir%/system32/inetsrv/appcmd set config -section:asp -scriptErrorSentToBrowser:true

    設定方法二:

asp設定,展開“調試屬性”選項,“将錯誤發送到浏覽器”這項預設的是False,改為True,然後點右側的應用!如圖所示:

繼續閱讀