2015-07-20 79 views
1

我收到提示:經典ASP的SQL Server「不允許操作」錯誤

Request object error 'ASP 0104 : 80004005' 

Operation not Allowed 

/post.asp, line 3 

此錯誤試圖寫入我的數據庫後,來了。我添加的代碼是

jquery stuff{ 
    ar2 = useless2.split("Summary"); 
    ar = ar2[0]; 
    re = new RegExp("\n", "g"); 
    useless = ar.replace(re, "<br>"); 
    re = new RegExp('"', "g"); 
    useless = ar.replace(re, '""'); 
    used = useless; 
    } 

html stuff{ 
<input type="hidden" name="vDescription_' + c + '" value="' + used + '"> 
} 

(是的,我知道用=沒用沒用)

一個什麼樣的描述看起來像一個例子:

<input type="hidden" name="vDescription_323" value=" 

0:07 Discussion 

1:06 Introduction and Motivation 

2:24 Support Vector Machines 

6:59 The Financial Kernel (FK) 

8:28 Kernel Methods 

10:10 Example 

10:14 Data Selection 

10:34 Preprocessing 

10:57 Testing 

"> 

這是從檢查的元素拉。我不完全確定爲什麼它會顯示新行而不是
代碼,這可能會導致錯誤?

ASP代碼:

<!--#include file="connv.inc"--> 
<% 
n=Request.form("total") 
response.write(n) 

for x = 0 to n-1 
ttitle=Request.form("title_"&x) 
title=Replace(ttitle, "'", "''") 
id=Request.form("id_"&x) 
views=Request.form("vViews_"&x) 
likes=Request.form("vLikes_"&x) 
description=Request.form("vDescription_"&x) 

sql="if NOT exists (select * from tbl_videos where videoId = '"&id&"') INSERT INTO tbl_videos(videoTitle, videoId, videoLikes, videoViews, videoDescription, swamCompatible) values ('"&title&"', '"&id&"', '"&likes&"', '"&views&"', '"&description&"', '0')" 
connv.execute(sql) 
response.write(sql&"<br>") 
next 
%> 

<html> 
<head> 
<title> Updating Tables </title> 
</head> 
<body> 

</body> 
</html> 

<!--#include file="closeEmv.inc"--> 
+0

你需要顯示post.asp –

+0

@AlexK服務器端代碼。哦,忘了。它已被添加進來。 –

+2

我懷疑第3行涉及到connv.inc –

回答

2

當發佈數據大小超過了ASP「最大實體請求身體極限」你可以得到這個錯誤。

Microsoft

This issue occurs if a Content-Length header is present and if the Content-Length header specifies an amount of data that is larger than the value of the AspMaxRequestEntityAllowed property in the IIS metabase. The default value for the AspMaxRequestEntityAllowed property is 204,800 bytes.

+0

這就是我發現的錯誤之一,但我不認爲我所傳遞的任何描述都有100-200個字符。 –

+0

看起來你一次發佈多個描述。這是重要的總尺寸。總大小是否可能超過請求大小限制? – Seamus

+0

哦,這是非常可能的。約有1000多種描述。所以我必須一次更新我的服務器數據庫幾百個? –