DMXzone Security Provider 2 Support Product Page

xhr 500 error with Classic ASP login

Reported 20 Jul 2021 07:55:18
1
has this problem
20 Jul 2021 07:55:18 Kent Angel posted:
I'm following the "Creating a Log In Page with DMXzone Security Provider 2" guide at www.youtube.com/watch?v=1XicaSIRM5k

The process works fine with PHP 7 and MSSQL database, but when using the same process with Classic ASP version and same MSSQL database/tables, I get a 500 server error, pointing to the following code in serverconnectForm.js:

Line 269:   try { this.xhr.send(data); }


Debugging mode reports the following:

{type: "ExecuteError", fileName: "lib/app.asp", errorNumber: -2146823281,…}
data: "function(exports, module, require) { \r\n\r\n\tvar modules = {};\r\n\tvar globalScope = require('./core/scope');\r\n\r\n\tfunction App() {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":6, \"method\": \"App\"}) */\r\n\t\tthis.debug = false;\r\n\t\tthis.error = false;\r\n\t\tthis.data = {};\r\n\t\tthis.meta = {};\r\n\r\n\t\tthis.scope = require('./core/scope');\r\n\t\tthis.request = require('./core/request');\r\n\t\tthis.response = require('./core/response');\r\n\t\tthis.session = require('./core/session');\r\n\r\n\t\tthis._init();\r\n\t}\r\n\r\n\tApp.prototype = {\r\n\r\n\t\t_init: function() {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":22, \"method\": \"_init\"}) */\r\n\t\t\tthis.response.onEnd = this._destroy.bind(this);\r\n\r\n\t\t\tvar globals = getGlobal('globals');\r\n\t\t\tif (globals.data) {\r\n\t\t\t\tthis.scope.set(globals.data);\r\n\t\t\t}\r\n\r\n\t\t\tthis.scope.set({\r\n\t\t\t\t'$_ERROR'  : null,\r\n\t\t\t\t'$_SERVER' : this.request.server,\r\n\t\t\t\t'$_GET'    : this.request.get,\r\n\t\t\t\t'$_POST'   : this.request.post,\r\n\t\t\t\t'$_HEADER' : this.request.headers,\r\n\t\t\t\t'$_COOKIE' : this.request.cookies,\r\n\t\t\t\t'$_SESSION': this.session.items\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tset: function(key, value) {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":41, \"method\": \"set\"}) */\r\n\t\t\tglobalScope.set(key, value);\r\n\t\t},\r\n\r\n\t\tget: function(key, defaultValue) {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":45, \"method\": \"get\"}) */\r\n\t\t\tvar value = globalScope.get(key);\r\n\t\t\treturn value !== undefined ? value : defaultValue;\r\n\t\t},\r\n\r\n\t\tdefine: function(cfg) {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":50, \"method\": \"define\"}) */\r\n\t\t\tif (cfg.settings) this.parseSettings(cfg.settings);\r\n\t\t\tif (cfg.meta) this.parseMeta(cfg.meta);\r\n\t\t\tif (cfg.vars) this.set(cfg.vars);\r\n\t\t\tif (cfg.exec) this.exec(cfg.exec);\r\n\t\t},\r\n\r\n    parseSettings: function(settings) {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":57, \"method\": \"parseSettings\"}) */\r\n      if (settings && settings.options) {\r\n        if (settings.options.scriptTimeout != null) {\r\n          Server.ScriptTimeout = +settings.options.scriptTimeout;\r\n        }\r\n      }\r\n  \t},\r\n\r\n\t\tparseMeta: function(meta) {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":65, \"method\": \"parseMeta\"}) */\r\n\t\t\tif (FileSystem.FileExists(Server.MapPath(require.baseUrl + 'lib/validator/validator.asp'))) {\r\n\t\t\t\tvar validator = require('lib/validator/validator');\r\n\t\t\t\tvalidator.parseMeta(meta);\r\n\t\t\t}\r\n\r\n\t\t\tthis.meta = meta;\r\n\t\t},\r\n\r\n\t\texec: function(actions, internal) {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":74, \"method\": \"exec\"}) */\r\n\t\t\tif (Array.isArray(actions)) {\r\n\t\t\t\tfor (var i = 0; i < actions.length; i++) {\r\n\t\t\t\t\tthis.exec(actions[i], internal);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._exec(actions.steps || actions);\r\n\r\n\t\t\tif (this.error) {\r\n\t\t\t\tif (actions['catch']) {\r\n\t\t\t\t\tthis.scope.set('$_ERROR', this.error);\r\n\t\t\t\t\tthis.error = false;\r\n\t\t\t\t\tthis._exec(actions['catch']);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.response.error(this.error);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!internal) {\r\n\t\t\t\tthis.response.json(this.data);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_exec: function(steps) {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":100, \"method\": \"_exec\"}) */\r\n\t\t\tif (typeof steps == 'string') {\r\n\t\t\t\tvar actionsPath = Server.MapPath(require.baseUrl.replace(/dmxConnectLib/, 'dmxConnect/modules'));\r\n\t\t\t\tsteps = require(actionsPath + '/' + steps);\r\n\t\t\t}\r\n\r\n\t\t\tif (Array.isArray(steps)) {\r\n\t\t\t\tfor (var i = 0; i < steps.length; i++) {\r\n\t\t\t\t\tthis._exec(steps[i]);\r\n\t\t\t\t\tif (this.error) return;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (steps.disabled) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (typeof steps == 'function') {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsteps.call(this);\r\n\t\t\t\t} catch(e) {\r\n\t\t\t\t\tthis.error = e;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (steps.module && steps.action) {\r\n\t\t\t\tvar userPath = Server.MapPath(require.baseUrl.replace(/dmxConnectLib/, 'extensions/server_connect/modules'));\r\n\t\t\t\tvar module;\r\n\t\t\t\tif (FileSystem.FileExists(userPath + '/' + steps.module + '.asp')) {\r\n\t\t\t\t\tmodule = require(userPath + '/' + steps.module);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmodule = require('modules/' + steps.module);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!modules[steps.module]) {\r\n\t\t\t\t\tmodules[steps.module] = module;\r\n\r\n\t\t\t\t\tif (module._init) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tmodule._init.call(this);\r\n\t\t\t\t\t\t} catch(e) {\r\n\t\t\t\t\t\t\tthis.error = e;\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\terr.throwError = true;\r\n\t\t\t\t\tvar data = module[steps.action].call(this, clone(steps.options), steps.name);\r\n\r\n\t\t\t\t\tif (data instanceof Error) {\r\n\t\t\t\t\t\tthrow data;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (steps.name) {\r\n\t\t\t\t\t\tthis.scope.set(steps.name, data);\r\n\r\n\t\t\t\t\t\tif (steps.output) {\r\n\t\t\t\t\t\t\tthis.data[steps.name] = clone(data);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch(e) {\r\n\t\t\t\t\te.step = steps;\r\n\t\t\t\t\tthis.error = e;\r\n\t\t\t\t\terr.throwError = false;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\terr.throwError = false;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_destroy: function() {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":173, \"method\": \"_destroy\"}) */\r\n\t\t\tif (this.request.files) {\r\n\t\t\t\tthis.request.files.forEach(function(file) {/* STACK({\"fileName\":\"lib/app.asp\", \"lineNumber\":175, \"method\": \"undefined\"}) */\r\n\t\t\t\t\ttry { FileSystem.DeleteFile(file.tmp_name); } catch(e) {}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfor (var id in modules) {\r\n\t\t\t\tvar module = modules[id];\r\n\r\n\t\t\t\tif (module._destroy) {\r\n\t\t\t\t\ttry { module._destroy.call(this); } catch(e) {}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t// Exports\r\n\r\n\tmodule.exports = new App();\r\n\r\n\r\n}"
errorNumber: -2146823281
fileName: "lib/app.asp"
message: "'data' is null or not an object"
stack: []
type: "ExecuteError"

Replies

Replied 27 Aug 2021 08:25:56
27 Aug 2021 08:25:56 Kent Angel replied:
Are these support forums still active?
I'm still having issues with this error.

Has the introduction and inclusion of all extensions into Wappler meant all support is focused on Wappler subscription users, rather than perpetual DW extension license users?
Replied 31 Aug 2021 07:41:44
31 Aug 2021 07:41:44 Teodor Kuduschiev replied:
Hello Kent,
Apologies for the late reply, we've been on a summer break so we missed your topic.
The forums are still active. There is no need to post the same topic over and over again, one topic per issues is just enough.

As Dreamweaver is being slowly killed by Adobe in the past few years, Wappler is indeed our primary focus at the moment so there may be slight delays in replies here.

Reply to this topic