BUG: "Remote Scripting Error" When You Use Page Object DTC (197355)
The information in this article applies to:
- Microsoft Visual InterDev 6.0
This article was previously published under Q197355 SYMPTOMS
When you execute a remote script using the Page Object design time control
and passing a string containing the characters "/" and ".", the string
might be altered or you might receive the following error:
Remote Scripting Error
REMOTE SCRIPTING ERROR: Page invoked does not support remote scripting.
CAUSE
The string that is passed is interpreted as a path and actually executed as
a path. For example:
"/../" causes the remote scripting error.
"/./" is changed to "/", as well as any repeat of this pattern.
For example, "/./././././" is changed to "/".
In addition, the path is opened, which might cause the remote scripting
error if the path points to a location outside of the application scope.
RESOLUTION
Write a function that converts all "/" characters into some nonprintable
character before passing the string and change it back after the function
is called.
For example:
<script language="JavaScript">
function Encode_String(x){
// Changes the "/" character to the nonprintable ascii code 1.
x=x.replace(/([/]*)+/g, String.fromCharCode(1));
return x;
}
function Decode_String(x){
// Converts the string in the above function back to its original
// form.
var re = new RegExp('(['+ String.fromCharCode(1)+ ']*)+', 'g');
x=x.replace(re, "/");
return x;
}
</script>
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 3/16/2005 |
---|
Keywords: | kbBug kbCtrl kbDSupport kberrmsg kbInetDev kbRemoteProg KB197355 |
---|
|