癥狀
運行時表現出的癥狀
當您在 microsoft asp.net web 應用程序中查看 .aspx 頁時,可能會遇到下列癥狀:
• 瀏覽器中可能會出現空白頁。
• 可能會收到下載 .aspx 頁的指令。
典型的現象是 .aspx 頁的服務器端代碼被處理,然后這些代碼不以其原始形式發送到 web 瀏覽器。
在使用 visual studio .net 調試 asp.net 時表現出的癥狀
當您在 microsoft visual studio .net 中調試 asp.net 應用程序時,可能會在 ide 中收到以下錯誤信息:
error while trying to run project:unable to start debugging on the web server.the server does not support debugging of asp.net or atl server applications.run setup to install the visual studio .net server components.if setup has been run, verify that a valid url has been specified.
you may also want to refer to the asp.net and atl server debugging topic in the online documentation.would you like to disable future attempts to debug asp.net pages for this project?
原因
在安裝 microsoft .net framework 軟件開發工具包 (sdk) 或 microsoft visual studio .net 之后,將創建 microsoft internet 信息服務 (iis) 映射,以關聯 asp.net 的新文件擴展名和新設置。
如果下列任一陳述適合于您的情況,則新設置不存在。
• 當運行 .net framework sdk 或 visual studio .net 安裝程序時,iis 沒有安裝。
• 在運行 .net framework sdk 安裝程序或 visual studio .net 安裝程序之后,刪除了 iis,然后重新安裝 iis。
解決方案
要解決此問題,請修復 iis 映射,以便 asp.net 的文件擴展名正確地關聯。有兩種修復 asp.net 的 iis 映射的方式。
要修復 asp.net 的 iis 映射,請運行 aspnet_regiis.exe 實用工具。為此,請按照下列步驟操作:
1. 單擊開始,然后單擊運行。
2. 鍵入 cmd,然后單擊確定。
3. 在命令提示符處運行以下命令,然后單擊確定:
"/<windows 文件夾>/microsoft.net/framework/<版本號>/aspnet_regiis.exe" -i
注意:請用安裝操作系統的目錄名稱替換 <windows 文件夾>,用在您的計算機上安裝的 .net framework 版本替換<版本號>。
要修復 asp.net 的 iis 映射,必須注冊 aspnet_isapi.dll。為此,請按照下列步驟操作:
1. 單擊開始,然后單擊運行。
2. 鍵入 regsvr32 <windows 文件夾>/microsoft.net/framework/<版本號>/aspnet_isapi.dll,然后單擊確定。regsvr32 將返回注冊結果。
新聞熱點
疑難解答
圖片精選