问题
I'm getting error:
Request object error 'ASP 0104 : 80004005'
Operation not Allowed
/post.asp, line 3
This error came after attempting to write to my database. The code I added was
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 + '">
}
(Yes I know used=useless is useless)
An example of what a description looks like:
<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
">
This is pulled from inspecting the elements. I'm not entirely sure why it shows me new lines instead of the
code, which may be contributing to the error?
ASP code:
<!--#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"-->
回答1:
You can get this error when the posted data size exceeds the ASP "Maximum Entity Requesting Body Limit".
From 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.
来源:https://stackoverflow.com/questions/31519408/classic-asp-sql-server-operation-is-not-allowed-error