![]() |
Previous | Next |
The EServicePublishLocalRestrictions property retrieves a value indicating the zone or zones in which an e-service must be hosted in order to publish a project to the local computer.
Syntax
Application.Options.EServicePublishLocalRestrictions
Possible Values
This property is a read-only Number.
Value | Description |
0 | Local computer only |
1 | Intranet or local computer |
2 | Internet, intranet, or local computer |
Remarks
This property corresponds to a setting on the Security tab of the Options dialog box, which can be accessed from the Tools menu.
Example
The following example illustrates the use of this property:
<HTML>
<HEAD>
<SCRIPT>
// Set up some convenience variables.
var Application = window.external;
var MyWebHost = Application.Project.Properties.PublishWebHost;
var LocalProfile = Application.ProfileManager.HighQualityAudioVideo;
var RemoteProfile = Application.ProfileManager.MediumQualityAudioVideo;
// Set a constant that indicates the location of the e-service.
// 1 = local computer, 2 = intranet, 3 = Internet
ESERVICEZONE = 3;
</SCRIPT>
</HEAD>
<BODY>
Choose a publish destination:
<SELECT id="PublishZone" name="PublishZone">
<OPTION value="local" selected="yes">Local Computer</OPTION>
<OPTION value="remote">Remote Computer</OPTION>
</SELECT>
<INPUT type="button" value="Publish" onClick="publish()">
<SCRIPT language="JScript">
function publish() {
if (PublishZone == "local") {
// Test whether the publishing restrictions are
// too restrictive for the e-service's zone.
if (Application.Options.EServicePublishLocalRestrictions < ESERVICEZONE) {
alert("This e-service is not authorized to publish presentations on the local computer. Check your security settings.");
return;
}
// Let the user choose the location on the local computer.
MyWebHost.PublishDestination = Application.Publisher.ChooseDirectory();
if (MyWebHost.PublishDestination == "") {
return; // The user clicked Cancel.
}
MyWebHost.AddProfile(LocalProfile);
} else { // PublishZone == "remote"
// Test whether the publishing restrictions are
// too restrictive for the e-service's zone.
if (Application.Options.EServicePublishRestrictions < ESERVICEZONE) {
alert("This e-service is not authorized to publish presentations on remote computers. Check your security settings.");
return;
}
MyWebHost.PublishDestination = "http://remote_hosting_service";
MyWebHost.AddProfile(RemoteProfile);
}
try {
Application.Publisher.PublishPresentation();
} catch (e) {
alert("There were errors. Publish failed.");
}
}
</SCRIPT>
</BODY>
</HTML>
See Also
Previous | Next |