Link to home
Start Free TrialLog in
Avatar of sl311
sl311Flag for United States of America

asked on

Remote Scripting. Failed to create ASP Object for :

I had the same web app deployed on 3 different servers, all working fine with remote scripting. After working fine for weeks, all of a sudden, the error:

Failed to create ASP Object for : filename.asp

...is appearing on all of them at the line:

var objRS = RSGetASPObject("filename.asp");

As this occured simultaneously across three different servers with no change to the source code, I am thinking it must be a global secruity or maybe browser setting that has changed. I have tried changing some security and browser settings on one of the servers but always get the error above. Any idea what is likely to have changed that could cause this and what the remedy is ?

Thanks,
Mark
Avatar of Göran Andersson
Göran Andersson
Flag of Sweden image

The likely reason is that filename.asp is returning an error message. Browse to it, just to see if it runs or not.
Avatar of sl311

ASKER


Browsed to it and its fine - no error message.
Then the syntax checks out.

The remote scripting code seems to fail to execute the remote scripting initializing code in the file. Can you post it here?
Avatar of sl311

ASKER

This is the initialisation and call:

<script language="JavaScript" src="_ScriptLibrary/RS.HTM"></script>
<script language="JavaScript">RSEnableRemoteScripting("_ScriptLibrary");</script>

<script language="JavaScript">
function deleteASR(asr_id) {
     var objRS = RSGetASPObject("sc_asr_tuning_server.asp");
     var objResult = objRS.deleteTuned(asr_id);}
</script>

This is in filename.asp (truncated):

<!--#INCLUDE FILE="_ScriptLibrary/RS.ASP"-->
<!--#include file="utilities.asp"-->
<%RSDispatch %>
<script language="JavaScript" runat="server">
var public_description = new MainMethod();
function MainMethod() {
     this.deleteTuned = Function('asr_id', 'return delete_tuned(asr_id)');}
</script>

<script language="VBScript" runat="server">
function delete_tuned(asr_id)
     execute_sql("delete from tuning_asr where asr_id=" & cstr(asr_id))
end function

function execute_sql(sql)
dim objConn
     set objConn = Server.CreateObject("ADODB.Connection")
     objConn.Open application("Connection_String")
     objConn.Execute(sql)
end function
</script>

Am sceptical anything is wrong here because it was working, then all of a sudden on 3 separate servers it stopped working. Must be a configuration issue I think.
ASKER CERTIFIED SOLUTION
Avatar of Göran Andersson
Göran Andersson
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sl311

ASKER

Sorry, I put filename.asp in my early example as it was more readable than sc_asr_tuning_server.asp. It is the correct filename (or it wouldn't have worked before).

Doubt that commenting out code will help - I know its the RSGetASPObject line that fails, and as the exact same code used to work, I still think something externally must have changed.

Will try commenting out/trying the simplest possible example, unless there are any other suggestions.
Avatar of sl311

ASKER

I have traced through the RS.htm code, and the line that it seems to fail on is:

request.status = this.rsapplet.getStatus();

It seems to set the status at -1. Would this have something to do with the ability to run applets or something like that ?

function _MSRS_handleResponse(requestid)
{
     var request = this.requestList[requestid];
    if (typeof(request) == 'undefined')
     {
        alert('Unknown request id.');
          return;
     }
alert(request.status);
    request.status = this.rsapplet.getStatus();
alert(request.status);
Avatar of gladxml
gladxml

No comment has been added lately and it seems that this question have been abandoned. So it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question or invite a Moderator to close this question if there's no reply from you after seven days.

In the absence of responses, I will recommend the following:

To accept the comment and points awarded to  GreenGhost


** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **


Just trying to help for the cleanup...
gladxml