Classic ASP response times varying extremely - ms-access

I am working on a set of Classic ASP (VBScript) websites under different domains with 64bit Access (2013) database connection. Server is a shared Windows Server 2012 with IIS 8.5. The sites were not coded by me.
Everything seems to work fine for a time, but after several page calls (sometimes also at the first or only call to the site) the server does not respond for more than 20 to 30 seconds. This means: I can't call ANY page hosted on this server, even all other websites under different domains stop working for that time.
I am not sure, if plain HTML pages will respond, but it seems not. After such an issue everything is running fine again for various periods (up to 1 or 2 minutes), pages show up with normal response time, then this system hang repeats. And so on…
Finding the problem is extremely difficult, because all the sites on this shared hosting server could possibly cause this behaviour, it not necessarily seems to be triggered by my specific page call or subsequent calls, though it could be.
I am not sure, where to even look for the problem. I searched this forum and noticed some interesting answers, but not exactly to our problem. I tried Sysinternal's Process Monitor on a virtual server, where only one specific site is hosted and the same issues exists, but was not able to interpret most of the messages. I looked into event viewer log at this machine and noticed entries saying:
A trappable error (C0000005) occurred in an external object. The script cannot continue running.
But even if that sounds to be a possible reason, I am not sure where to look in the script or a log file, where I could find the trigger of all that. And on the shared host I don't even have the possibility to do that. On our local 'internal webserver' under Windows 10, where local copies of all the sites reside, I can. But I'm not sure, where to start my search.
Any help would be appreciated (and please don't needle me with proposals for switching to ASP.net or SQL - this is not possible at the moment).

I work with huge classic ASP application this error normally happens in a call for a Server.CreateObject('foo'). We have this kind of error here normally at the excel object when someone try to upload a very large .xls file. I would start mapping all the Server.CreateObject.

Related

How to resolve Microsoft Access Error 3043

My company uses a shared MS Access database, with a back end stored on a server and a front end copied onto users desktops.
Recently, our IT department moved us to a new server without giving us any notice, and now our database keeps crashing.
Every 20-40 minutes, users get an error message that says:
Error 3043 Your network access was interrupted. To continue, close the database, and then open it again.
If they close and reopen, it does work. However, I'd like to stop this from happening, since it typically happens when they are in the middle of something and have to re-do everything.
I've already spoken with our IT consultants and they see no issue with our server/network, nor do they know anything about Access and therefore are no help.
Does anyone have any experience with this or have any ideas that may help me repair my database?
Thanks in advance.
Here are some thoughts:
It sounds very much like (short) network interruptions. MS Access doesn't like these at all, in particular it doesn't recover from a broken connection (even if very short) until you restart the frontend.
Network interruptions during write operations on Access backends are the prime cause of backend database corruption. Consider yourself lucky if you haven't experienced that yet. But you should backup and Compact&Repair the backend often (!) .
You can prevent backend corruptions by moving the backend to a server database, e.g. SQL Server Express (free). Errors will still occur ("ODBC call failed" instead of error 3043), but they will only affect the frontends.
You can probably work around all errors by changing the frontend from bound forms to unbound forms. This is a major undertaking.
I don't think there is anything you can do with the backend to prevent the errors.
If this database has value to your company, and IT says there is no problem, I suggest you escalate the problem to someone who can make IT look closer into the issue.
(How to do so would be a separate question, perhaps on SuperUser.)

Unwanted code being inserted into pages

Some of our ColdFusion sites are having the words "coupon" inserted into their footer with a link to another site. Is there anything I can do to prevent this? Is there any software I can run to help detect any vulnerabilities? It doesn't seem to be SQL injection as the databases seem fine and nothing unusual is showing up in the logs.
There are several variations of attacks that produce this sort of result (appending a link to some malicious or nefarious site). For example, this one (Script Injection) uses the latency between a file upload and checking to insert executable code on your server.
Other attack vectors include FTP (which is why you should not use it), or other file transfer protocols. In your case the infected machine may not be the server. It could be a client machine with access to the server - a developer who has set up FTP to the server for example.
Let me know if you need formal help - we have a good track record fixing this sort of thing. If you get more clues post them and I'll try to help. I will warn you that if this is a server infectionit is at the root level and is so pervasive your only option is to start with a pristine install and reinstall your code. Bad news I know - sorry :(
We had something similar happen when one of our servers was hit by the hack Charlie Arehart describes here:
http://www.carehart.org/blog/client/index.cfm/2013/1/2/serious_security_threat
Have you had these patches?
Another option that I would recommend is searching your site(s) for any use of the <cffile> tag that isn't expected. I had a customer that somehow got a single file that was a backdoor to their site. It was particularly dangerous because it could upload files to any location on the server as well as execute any SQL command against any datasource on the server. In other words, this single file opened the door to all of the sites and databases that were running on that server.
This backdoor file (which was named vision.cfm) was often used to update footers with links to coupon and spam sites. vision.cfm was only 210 lines of code.
The entire server had to be sanitized after this was discovered.

Blackberry WebWorks HTML5 Database Issues

I've been having lots of problems getting my application to work using an sqlite database. Everything works just fine in ripple (I presume this is because it's just using chrome's sqlite implementation). However, once I run my app on a simulator (Curve 9300, OS 6) the problems begin. I've gotten to where the app can run, create a database, and insert rows, so I know that my actual queries are fine.
My application has a javascript file that has wrappers for working with the database. This javascript file is sourced in both the listener, and the page that is the core of the application. The problem is as follows:
Install the application. The listener starts running.
Send a text message from one simulator to another. The message is saved successfully (I can verify this because my banner indicator count increases, and the number is based of off a query)
Continue sending texts, and the banner indicator will increase.
Open the application, and read all of the messages. At this point, the javascript file is loaded twice, so I have two db objects pointing to the same database.
Close the application (listener is still running)
The next text message received causes a Runtime Exception, with no further details provided.
I looked at the stack trace, and it just says that the exception took place in the callback of the sms listener. This is obvious, as that's where the queries happen. Does anyone have any idea why opening a second connection to the db causes the exception? As far I understand, the db is only locked during a transaction. There are definitely no transactions running, other than the one trying to insert the new row. Although I'm new to javascript, I'm quite sure that no variables are being shared as the javascript file is loaded in two different pages. Any ideas would be greatly appreciated.
Well, I couldn't find a solution. I don't think the blackberry sqlite implementation can handle two concurrent connections. Instead, my listener now saves incoming data to a file. The file is read in when the main application opens, and all necessary data is saved to the db then. Afterwards, the file is deleted and the application performs queries without problem. I hope this helps anyone dealing with a similar issue.

Access and classic ASP error 80004005 System resource exceeded

An old site on shared hosting has developed an error when executing a simple SQL statement
Microsoft JET Database Engine error '80004005'
System resource exceeded.
/411971/users1.asp, line 68
Line 68 is Set objCon = objCommand.Execute
The Access database isn't large (less than 2Mb), this is a single table query and the table only contains around 500 records. Field count is only about 20 too with no memo fields. Nothing has changed in the script. A compact/repair on the database has no effect, as does creating a new database and copying the table in question too it.
Looking round in the web this would appear to be most likely a web server issue rather than the code (and the behaviour would indicate this too) but I'm not finding anything conclusive - and knowing how shared hosting support works I'd like to have a definitive case before I go to them. Has anyone else seen this error/behaviour before and what was the problem/solution.
OUTCOME: I made sure I'd tried all the obvious approaches then emailed the ISP support who confirmed it was a server issue and restarted services, which fixed the problem
It may simply be a connection limit. On shared hosting with other sites using the same backend the limits are easily hit. Whilst you can help by making sure you explicitly close any connections after your script has used them, in the end this would be a hosting issue your provider would need to look at.
This is probably not what you want to hear, but Access/Jet is an unsuitable database backend for a web application. I got hangs and inexplicable errors like this from it with just a couple of concurrent users. When MySQL and SQL Server Express are free there is no reason to use Access on the web.
If the issue happens again, just ask your hosting provider to recycle the application pool on IIS.

Enterprise Service Bus is this the right solution?

C# 2008
I have developed an application that need to connect to a web server in order to work. If the web server goes offline. The the app will have to be notified so that the user using the app can know what happened.
This application will be downloaded from the internet from our clients web site. So hundreds or thousands of users could have it.
I was thinking about pinging the web server maybe every 5 seconds. However, with 100's or 1000's apps would overload the web server.
Someone has told me about ESB would be right for this problem. The way I am thinking to use this, and I am not totally sure. Is to have every app to subscribe to the ESB. If the web server goes offline it will send a message to all the apps.
However, I understand that ESB is very big and complex and maybe this is overkill for my problem.
Am I understanding correctly.
If ESB is not the correct choice is there another design pattern I could use?
Many thanks
It sounds inappropriately out of scope to spec an ESB for this simple purpose. Why not just have the client machines figure it out as they periodically need to access the website? Instead of pinging the web server over and over, in the course of their normal activities they will need to access the web server for any normal reason, if they get an error response they can branch down the "web server is down" code path.
An ESB sounds like the wrong solution.
Two possibilities come to mind:
(1) If the user doesn't need to know they're offline in real-time, defer detection to usual error handling when you try and access the server.
(2) If you must know real time, use a small proxy at each client site so that only the proxies need to ping your server, not every desktop.