Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP "Operation not Allowed" error occured while eecute Request.Form method

Tags:

asp-classic

I have run the following script for increase the file size for upload E:\inetpub\adminscripts cscript adsutil.vbs set w3svc/ASPMaxRequestEntityAllowed size

After running the command.I am getting this error...

Request object error 'ASP 0104 : 80004005'

Operation not Allowed

/ewqms370/common/indexintermediate.asp, line 63

...for this code here:

strUserName=Replace(Request.Form("txtUserName"),"'","''")

Can anyone see something wrong???

like image 952
mahesh kumar Avatar asked Dec 14 '22 01:12

mahesh kumar


2 Answers

What value did you see the AspMaxRequestEntityAllowed property to? Remember that this should be specified in bytes so you may want to double-check this. It would probably be worthwhile to open up your metabase file to ensure your script updated the setting accordingly. On IIS6 you can open metabase.XML which is located in c:\Windows\System32\Inetsrv and find the line AspMaxRequestEntityAllowed to double-check this.

AspMaxRequestEntityAllowed specifies the maximum number of bytes allowed in the entity body of an ASP request. If a Content-Length header is present and specifies an amount of data greater than the value of AspMaxRequestEntityAllowed, IIS returns an error response. This property is related in function to MaxRequestEntityAllowed, but is specific to an ASP request.

Official documentation in MSDN: AspMaxRequestEntityAllowed Metabase Property (IIS 6.0)

like image 164
Jakkwylde Avatar answered Jan 23 '23 04:01

Jakkwylde


The reason you've expanded the Request entity is probably because you are posting a file to the server. However to do that you will either be using a multipart mime type or you have some home grown code consuming the entity body. In either case the request Form object is not going to be of any use. It only works when standard url encode form data is posted.

like image 26
AnthonyWJones Avatar answered Jan 23 '23 04:01

AnthonyWJones