Search these areas:
Support Forums
Product Info

-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Data Analysis
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-New Responsive UI Module

DataWeb Help
Support Forums
Script Library
Knowledge Base

Home > Support


Info: Error.Errors.NoAccess / Security violation while running scripts
Article TypeInfo
TitleError.Errors.NoAccess / Security violation while running scripts
<p><i>When using the read() method I get the error message: <br></i>
   'Unhandled Exception: Error (Error.Errors.NoAccess)
   occurred in ... -- File error: Security violation on file ....'  </pre><i>What security violation is occuring and how can I avoid it?</i></p>

<p>In order to run a script that reads a file, a user needs to have Designer permissions on the folder that contains the file.  So if your web contains a script that uses the read() method, users with permissions below the Designer level will not be able utilize this script.
One way to allow users without Designer permissions to utilize such a script is to lower the security requirements on the script.  For example, you can specify that the function should operate as if users of the function had Adminstator permissions.  You lower permissions on a script by using a qualifier such as 'asAdmin' in the definition of your script.
For example, the following script cannot be utilized by users with permissions below Designer, because the script contains the read() method.

webcall function readerFunc()
var fl = new File("/temp/");
var rd =;
return rd;
But the modified script below can be run by users with permissions below Designer level, because the script is run as if it were being utilized by an Administrator of the web.

webcall asAdmin function readerFunc()
var fl = new File("/temp/");
var rd =;
return rd;
For more information see the help topic below:
Last ReviewedFebruary 20, 2015 14:06:03

Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us