2015-07-20 43 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多种描述。所以我必须一次更新我的服务器数据库几百个? –

相关问题