Win10下通過IIS調試ASP程式遇到的問題和解決方案

來源:互聯網
上載者:User

標籤:doc   html   iis   down   asp   www.   proc   函數   iframe   

最近維護了以前別人的寫的一個ASP的系統,記錄一下調試過程中的問題和解決方案。

環境篇全球資訊網發布服務(W3SVC)已經停止

問題
全球資訊網發布服務(W3SVC)已經停止。除非全球資訊網發布服務(W3SVC)正在運行,否則無法啟動網站。

解決方案

需要先啟動整個應用。

IIS服務

控制台>>程式和功能>>啟動或關閉Windows功能>>IIS服務

但是這樣僅僅是開啟了IIS服務,會出現Http500錯誤,不能運行ASP程式,因為IIS伺服器預設並沒有幫我們配置ASP或者ASP.NET環境,需要自己手動設定(在此過程中,我啟動過多次電腦)。

配置ASP環境

ASP配置如下:

如果需要ASP.NET,需要如下配置:

IIS7中出現An error occurred on the server when processing the URL錯誤

錯誤描述
An error occurred on the server when processing the URL. Please contact the system administrator.If you are the system administrator please click here to find out more about this error.

  1. 開啟控制台→管理工具→Internet 資訊服務(IIS)管理器→雙擊“ASP”表徵圖
  2. 在左邊的視窗中找到你的網站,然後在右邊的視窗中展開“調試屬性”,把“將錯誤發送到瀏覽器”設為True即可

此時你再運行ASP程式時就會看到具體的錯誤了,然後再根據錯誤提示進行相應的修改即可。

代碼篇ADODB.Connection 錯誤 ‘800a0e7a‘

具體錯誤
ADODB.Connection 錯誤 ‘800a0e7a‘
未找到提供者。該程式可能未正確安裝。

原因

因為系統是64位的win10,所以會出現這個問題。

解決辦法
找到IIS應用程式集區,“設定應用程式集區預設屬性”->“常規”->”啟用 32 位應用程式”,設定為 True。


height="100%" width="100%"

style="width:757px; height:455px;"
這樣問題就解決了。

ADODB.Recordset 錯誤 ‘800a0cc1‘

描述
ADODB.Recordset 錯誤 ‘800a0cc1‘
在對應所需名稱或序數的集合中,未找到項目。

解決
一般是欄位寫錯了或者,你的資料庫沒有這個欄位。

iframe自適應

JS代碼:

//iframe高度自適應function IFrameReSize(iframename) {    var pTar = document.getElementByIdx_x_x(iframename);    if (pTar) { //ff        if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight) {            pTar.height = pTar.contentDocument.body.offsetHeight;        } //ie        else if (pTar.Document && pTar.Document.body.scrollHeight) {            pTar.height = pTar.Document.body.scrollHeight;        }    }}//iframe寬度自適應function IFrameReSizeWidth(iframename) {    var pTar = document.getElementByIdx_x_x(iframename);    if (pTar) { //ff        if (pTar.contentDocument && pTar.contentDocument.body.offsetWidth) {            pTar.width = pTar.contentDocument.body.offsetWidth;        } //ie        else if (pTar.Document && pTar.Document.body.scrollWidth) {            pTar.width = pTar.Document.body.scrollWidth;        }    }}

Iframe框配置:

<iframe src="Main.htm" scrolling="no" frameborder="0" height="100%"id="mainFrame" width="100%" onload=‘IFrameReSize("mainFrame");IFrameReSizeWidth("mainFrame");‘></iframe>
ACCESS分頁
select * from news where nid between(SELECT min(nid) from(select top 4 nid from newsdata order by nid desc))and(SELECT min(nid) from(select top 1 nid from newsdata order by nid desc))order by nid desc

利用top和min函數分別找出分頁的起始ID和結束ID,如果要按照升序排列,就要用top和max來找出起始ID和結束ID,之後在使用between語句直接選取。注意三個地方的排序方式必須一致,查詢條件也必須一致。

參考文檔

  1. 簡單又高效的Access分頁語句

Win10下通過IIS調試ASP程式遇到的問題和解決方案

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.