A 500 error logged in iis logs for a classic asp application - vbscript

I have traditionally worked with ASP.Net and webforms and I'm not familiar with VBScript and Classic ASP. Unfortunately my new job requires me to work on Classic ASP and VBScript. I need some help in diagnosing this bug where the error
|42|800a01c2|Wrong_number_of_arguments_or_invalid_property_assignment:_'SESSION'
is being logged for the URI Query (cs-uri-query) section in the IIS logs.
I've been trying to figure it out for the last 2 days but I've had no luck.
All my googling has not got me any good answer (or maybe I wasn't looking in the right area). The Wrong_number_of_arguments_or_invalid_property_assignment says that wrong params or wrong number of params is being passed in to some method. But the _SESSION is perplexing.
Here is the full error log line.
2019-05-31 19:46:39 server-ip GET stem-uri |42|800a01c2|Wrong_number_of_arguments_or_invalid_property_assignment:_'SESSION' 443 - client-ip user-agent referrer-link 500 0 0 93
I don't have any code to show here unfortunately. This is a legacy application and I don't have any idea where this could be throwing up from. The configuration for this ASP site is bewildering.

So I realized this error was being thrown because the entire session variable was being nullified by this statement in one of the files. SESSION = "".
Once this was changed to SESSION.Abandon, the error went away.
Basically, IIS did not like the session variable being nullified that way.

Related

Login fails and getting Runtime Error when submitting password of a specific pattern

I am using ASP.NET MVC for a project, Everything works fine. Recently someone reported that if he tried to login to the interface with this password J&Mg<in5 the interface showed error page I mean not even the custom 500 error page which we have configured and works otherwise.
I have elmah configured on this project, no error is shown there too.
I little more investigation showed that all password of type, examples below
<ee
<fd
<reee
i.e "<" followed by any character gave this error.
Why is this error coming, and how to resolve this ?
I think it's the request validation that triggers in this case. Try disabling it and see if it helps. Also, try looking at the event log, it should contain a bit more useful details on the matter.
Hope this helps.

500 - Internal server error. IIS 7 using classic asp

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
Now showing error res-one. Please, how can I debug this asp classic language in PC?
Thanks!
Try to restart ISS, check paths, full reload page (Ctlr+F5)...
If you can, turn on logging in IIS and then check the log after you receive the 500 server error. Also, you can try using the FireFox browser, sometimes it will tell you which line of your code is having a problem.

Suspected IIS7.5 Connector Issue Tomcat & Coldfusion 10 if over certain size ajax call

I have test a form submission on my local testing server and all is good.
However once the code is uploaded to Coldfusion 10 on IIS7.5 it fails.
Basically if I have 2 contact details on the screen its fine, if there are three it refuses to update via ajax (called via ajaximport).
The url length is 2.48kb, the error varies from
"NS_ERROR_FAILURE: Failure"
Other times I get a 500 server error with
http://m.yapcrm.com/sites/dump/ii7errorlongajaxcall.cfm
I have checked the usual subjects and tweaked the server, but no joy..
Best I can figure its the connector to Tomcat as its the ISAPifilter picking up the issue.
In short, any hints or help would be great!!
As suggested above, no solution was found. However changing the default method from Get to Post
Example for reference anybody else.
var submitForm = new UpdateContact();
**submitForm.setHTTPMethod("POST");**
submitForm.setCallbackHandler(response);
submitForm.setErrorHandler(errorHandler);
submitForm.setForm("testValidator");
submitForm.UpdateContact();
UpdateContact() being the CFC method called via cfAjaxProxy.

AppRelativeCurrentExecutionFilePath is always set to ~/ for all ASP.NET Web API paths

Currently, we are adding asp-net web api support to an asp.net application. However when using any path to request an action on the controller, AppRelativeCurrentExecutionFilePath is always set to "~/" and results in 400 error. Used the route debugger available here confirmed that AppRelativeCurrentExecutionFilePath is always incorrect no matter what the url is.
For e.g. all of below url accesses, has AppRelativeCurrentExecutionFilePath as "~/"
http://localhost:1521/Testclient/apitest/values/get
http://localhost:1521/Testclient/apitest/values/get/1
Route debugger also shows failed/no match for above urls even though route table has required entries.
Have disabled all Application_BeginRequest/VPP/module/http handlers and anything that can cause routing to be impacted but still getting into same issue. Any other possible ways this can be debugged?
Update1: Checked the application.Request.AppRelativeCurrentExecutionFilePath by handling Application_BeginRequest( ) in global.asax, even there it appears to be wrong.
Seems to have found the issue, site had a "." in the name and for some reason asp.net does not like it. Root path that caused the issue was
http://localhost:1521/Test.client/apitest/values/get
http://localhost:1521/Test.client/apitest/values/get/1
Note the "Test.Client", changed it to "TestClient" and all worked as expected. When i copied the link from the test machine, had changed it and overlooked it. This should save somebody few hours if they hit this problem. Still not sure if this is a bug!?

What other 5xx errors could be occuring and how to I find/track them?

I have a Classic ASP/VBScript site running on IIS 6, and a program called SmarterStats (found via an earlier question) providing various stats and info from the server logs. This is an internal site, and we do use integrated authentication (AUTH_TYPE = Negotiate).
I'm looking at the report on response codes, and it says that in the last 7 days there have been 255 responses with a 5xx error code... naturally not the most useful stat I could get back.
I have a custom error page for 500 and 500.100 errors that logs the specifics for me to follow up on - and that log is virtually empty. I've tested with an intentionally broken page, and a standard user account, and it is working as expected - custom message, log entry made. (and checked with "friendly error messages" on and off - works either way)
The only entry I have in the log is a single entry for an error -2147024843 (authentication related, took too long to get a response), and that's it... what other errors could be happening and how can I find/track them?
Should I route all the different types of 5xx errors through my custom page? Or is there something else I should be doing?
Resolution: I'm going to go with running all 5xx errors through the custom page. For reasons that leave me totally baffled, the errors have stopped... I've not changed anything, no one has changed anything on that server - but the errors have stopped. Go figure.
It seems like logging all 5xx errors via your custom page might be a good idea. Your logging seems to be working, but SmarterStats seems like it might be giving you bogus data?
What version of SmarterStats are you using?
My hosting provider has Version 5.2 and I can see a detailed list of which pages have produced a 5xx error by going to Report Items > Server Responses > 5xx - Server Errors in the navigation tree. The report that gets displayed has a table listing the pages that have produced the error codes so you can then go investigate those pages to see what may be causing the error.
Depending on your site the error might be perfectly normal, for example I have some custom HTTP handlers which implement a standardised HTTP protocol which actually specifies that 5xx errors should be thrown under certain circumstances.
Though this shouldn't apply to an internal only site on public websites it is sometimes the case that badly written crawlers will access your pages in such a way as to produce an error

Resources