UltiDev Web Server Pro Configuration .NET API 1.0.0.15
.NET API for registering and unregistering web sites and applications with UltiDev Web Server.
UWS.Configuration.COM.MetabaseComServer2 Class Reference

A new addition to MetabaseComServer class, MetabaseComServer2 adds application registration with simultaneous application shortcut icon creation. More...

Inheritance diagram for UWS.Configuration.COM.MetabaseComServer2:
UWS.Configuration.COM.MetabaseComServer

List of all members.

Public Member Functions

IAppShortcut1 GetShortcut (IWebAppConfigEntry1 app, string optionalShortcutLocation, string optionalUrlHost, string optionalPathAndQueryString)
 Creates definition for a file system shortcut to the application. The shortcut definition needs to be passed to one of the RegisterApplicationWithShortcutsXXX() methods to get shortcut created during application registration.
IAppShortcut1 GetShortcutDisp (object app, string optionalShortcutLocation=null, string optionalUrlHost=null, string optionalPathAndQueryString=null)
 Automation/IDispatch/VBS version of the GetShortcut() method.
void RegisterApplicationWithShortcuts (RuntimeVersion aspNetVersion, bool run32bitOnx64, bool useDefaultSharedHostProcess, ProcessIdentity processIdentity, IWebAppConfigEntry1 application, IAppShortcut1 shortcut1, IAppShortcut1 shortcut2, IAppShortcut1 shortcut3)
 Same as MetabaseComServer.RegisterApplication(), with the ability to specify up to three application shortcuts that get generated when application is registered. Shortcuts can be create using GetShortcut() or GetShortcutDisp() methods.
void RegisterApplicationWithShortcutsDisp (RuntimeVersion aspNetVersion, bool run32bitOnx64, bool useDefaultSharedHostProcess, ProcessIdentity processIdentity, object application, object shortcut1, object shortcut2, object shortcut3)
 Automation/IDipatch/VBS version of the RegisterApplicationWithShortcuts() method.
void RegisterApplicationWithShortcuts1 (RuntimeVersion aspNetVersion, bool run32bitOnx64, ProcessIdentity hostUserIdentity, IWebAppConfigEntry1 application, IAppShortcut1 shortcut1, IAppShortcut1 shortcut2, IAppShortcut1 shortcut3)
 Same as MetabaseComServer.RegisterApplication1(), with the ability to specify up to three application shortcuts that get generated when application is registered. Shortcuts can be create using GetShortcut() or GetShortcutDisp() methods.
void RegisterApplicationWithShortcuts1Disp (RuntimeVersion aspNetVersion, bool run32bitOnx64, ProcessIdentity hostUserIdentity, object application, object shortcut1, object shortcut2, object shortcut3)
 Automation/IDipatch/VBS version of the RegisterApplicationWithShortcuts1() method.
void RegisterApplicationWithShortcuts2 (RuntimeVersion aspNetVersion, bool run32bitOnx64, IWebAppConfigEntry1 application, IAppShortcut1 shortcut1, IAppShortcut1 shortcut2, IAppShortcut1 shortcut3)
 Same as MetabaseComServer.RegisterApplication2(), with the ability to specify up to three application shortcuts that get generated when application is registered. Shortcuts can be create using GetShortcut() or GetShortcutDisp() methods.
void RegisterApplicationWithShortcuts2Disp (RuntimeVersion aspNetVersion, bool run32bitOnx64, object application, object shortcut1, object shortcut2, object shortcut3)
 Automation/IDipatch/VBS version of the RegisterApplicationWithShortcuts2() method.
string GetDefaultHost (bool forIOS)
 Returns machine's host name. If forIOS set to True, returns host name in either "machinename.local" or "machinename" format, depending whether machine is a member of a workgroup or a domain. If forIOS set to False, returns fully-qualigied domain name (FQDN) if machine is a member of a domain, or returns machine name, if computer is a member of a workgroup.
string CreateAppRedirectLink (string appID,[OptionalAttribute][DefaultParameterValueAttribute(null)]string host,[OptionalAttribute][DefaultParameterValueAttribute(null)]string optionalPathAndQueryString, params ushort[] portOrder)
 Generates port-agnostic link to an application via UWS Redirector.
bool WaitForAppToStart (string appID, int timeoutMilliseconds=-1)
 Allows waiting for an application to come online. Returns true when application responded, and false if timed out or application not found.
bool LaunchTheAppInTheBrowser (Guid appID, string optionalPathAndQueryString=null, int timeoutMilliseconds=-1)
 Opens locally-registered application in the default browser, if application is running.

Properties

IMetabaseComServer1 Base [get]
 For Automation/IDispatch/VBS clients, returns reference to IMetabaseComServer1 interface (MetabaseComServer object).

Detailed Description

A new addition to MetabaseComServer class, MetabaseComServer2 adds application registration with simultaneous application shortcut icon creation.

MetabaseComServer2 object can be instantiated using ProgID "UltiDev.WebServer.MetabaseComServer.2" or CLSID = 77BED825-5825-415F-ADE2-3D8625716FA7 To register an application, start with Base.GetWebAppEntry() and then RegisterApplicationWithShortcuts().


Member Function Documentation

string UWS.Configuration.COM.MetabaseComServer2.CreateAppRedirectLink ( string  appID,
[DefaultParameterValueAttribute(null)] string  host,
[DefaultParameterValueAttribute(null)] string  optionalPathAndQueryString,
params ushort[]  portOrder 
)

Generates port-agnostic link to an application via UWS Redirector.

Parameters:
appID
hostOptional. Host name or IP address to be used in the URL pointing to the UWS Recirector application. If null, default host will be used. If set to "*IOS*", host will be in the format of "machinename.local" or "machinename", depending on whether host machine is a member of a domain.
optionalPathAndQueryStringOptional. A part to be appended to the redirection URL, in case start page is different from web app's default document.
portOrderOptional. Lists port number preference order. Should be used when multiple non-80 and non-443 is used as listen addresses.
Returns:
string UWS.Configuration.COM.MetabaseComServer2.GetDefaultHost ( bool  forIOS)

Returns machine's host name. If forIOS set to True, returns host name in either "machinename.local" or "machinename" format, depending whether machine is a member of a workgroup or a domain. If forIOS set to False, returns fully-qualigied domain name (FQDN) if machine is a member of a domain, or returns machine name, if computer is a member of a workgroup.

Parameters:
forIOS
Returns:
IAppShortcut1 UWS.Configuration.COM.MetabaseComServer2.GetShortcut ( IWebAppConfigEntry1  app,
string  optionalShortcutLocation,
string  optionalUrlHost,
string  optionalPathAndQueryString 
)

Creates definition for a file system shortcut to the application. The shortcut definition needs to be passed to one of the RegisterApplicationWithShortcutsXXX() methods to get shortcut created during application registration.

Parameters:
appApplication definition
optionalShortcutLocationOptional. Location of the shortcut in the file system. If not specified, a desktop shortcut matching application name will be created. Can be on of the following three: 1) File name with .url extension. This will create shortcut with the given file name on the desktop. 2) Full .url file path, including an existing folder path, file name and .url extension. 3) Path to an existing folder. A shortcut file with the name matching application name will be created in the given folder.
optionalUrlHostOptional. Host name or IP address to be used in the URL pointing to the UWS Redirector application. If null, default host will be used. If set to "*IOS*", host will be in the format of "machinename.local" or "machinename", depending on whether host machine is a member of a domain.
optionalPathAndQueryStringOptional. A part to be appended to the redirection URL, in case start page is different from web app's default document.
portOrderOptional. Lists port number preference order. If not specified, application's port collection will be used.
Returns:
A reference to a newly-created shortcut definition object.
IAppShortcut1 UWS.Configuration.COM.MetabaseComServer2.GetShortcutDisp ( object  app,
string  optionalShortcutLocation = null,
string  optionalUrlHost = null,
string  optionalPathAndQueryString = null 
)

Automation/IDispatch/VBS version of the GetShortcut() method.

Parameters:
appApplication definition
optionalShortcutLocationOptional. Location of the shortcut in the file system. If not specified, a desktop shortcut matching application name will be created. Can be on of the following three: 1) File name with .url extension. This will create shortcut with the given file name on the desktop. 2) Full .url file path, including an existing folder path, file name and .url extension. 3) Path to an existing folder. A shortcut file with the name matching application name will be created in the given folder.
optionalUrlHostOptional. Host name or IP address to be used in the URL pointing to the UWS Redirector application. If null, default host will be used. If set to "*IOS*", host will be in the format of "machinename.local" or "machinename", depending on whether host machine is a member of a domain.
optionalPathAndQueryStringOptional. A part to be appended to the redirection URL, in case start page is different from web app's default document.
portOrderOptional. Lists port number preference order. If not specified, application's port collection will be used.
Returns:
A reference to a newly-created shortcut definition object.
bool UWS.Configuration.COM.MetabaseComServer2.LaunchTheAppInTheBrowser ( Guid  appID,
string  optionalPathAndQueryString = null,
int  timeoutMilliseconds = -1 
)

Opens locally-registered application in the default browser, if application is running.

Parameters:
appID
optionalPathAndQueryStringOptional path relative to application's root.
timeoutMillisecondsAmount of time to keep trying before applications responds. If set to negative value (use with caution), will try until application responds. If set to 0, will try to reach the application only once.
Returns:
True if application found accessible and launched successfully. False if application either has not responded within timeout limits, or browser failed to start.

This function will first ensure that application is accessible, and if it is, it will be launched in the browser. If application is found to be inaccessible, nothing will happen - the method will return false. If application is newly-registered, it may take some time to start the application, so this method will wait for a while for the application to come online, and once it does, it will be launched in the browser. This method is useful for post-registration application start.

void UWS.Configuration.COM.MetabaseComServer2.RegisterApplicationWithShortcuts ( RuntimeVersion  aspNetVersion,
bool  run32bitOnx64,
bool  useDefaultSharedHostProcess,
ProcessIdentity  processIdentity,
IWebAppConfigEntry1  application,
IAppShortcut1  shortcut1,
IAppShortcut1  shortcut2,
IAppShortcut1  shortcut3 
)

Same as MetabaseComServer.RegisterApplication(), with the ability to specify up to three application shortcuts that get generated when application is registered. Shortcuts can be create using GetShortcut() or GetShortcutDisp() methods.

Parameters:
aspNetVersion
run32bitOnx64
useDefaultSharedHostProcess
processIdentity
application
shortcut1Optional.
shortcut2Optional.
shortcut3Optional.
void UWS.Configuration.COM.MetabaseComServer2.RegisterApplicationWithShortcuts1 ( RuntimeVersion  aspNetVersion,
bool  run32bitOnx64,
ProcessIdentity  hostUserIdentity,
IWebAppConfigEntry1  application,
IAppShortcut1  shortcut1,
IAppShortcut1  shortcut2,
IAppShortcut1  shortcut3 
)

Same as MetabaseComServer.RegisterApplication1(), with the ability to specify up to three application shortcuts that get generated when application is registered. Shortcuts can be create using GetShortcut() or GetShortcutDisp() methods.

Parameters:
aspNetVersion
run32bitOnx64
hostUserIdentity
application
shortcut1Optional.
shortcut2Optional.
shortcut3Optional.
void UWS.Configuration.COM.MetabaseComServer2.RegisterApplicationWithShortcuts1Disp ( RuntimeVersion  aspNetVersion,
bool  run32bitOnx64,
ProcessIdentity  hostUserIdentity,
object  application,
object  shortcut1,
object  shortcut2,
object  shortcut3 
)

Automation/IDipatch/VBS version of the RegisterApplicationWithShortcuts1() method.

Parameters:
aspNetVersion
run32bitOnx64
hostUserIdentity
application
shortcut1Optional.
shortcut2Optional.
shortcut3Optional.
void UWS.Configuration.COM.MetabaseComServer2.RegisterApplicationWithShortcuts2 ( RuntimeVersion  aspNetVersion,
bool  run32bitOnx64,
IWebAppConfigEntry1  application,
IAppShortcut1  shortcut1,
IAppShortcut1  shortcut2,
IAppShortcut1  shortcut3 
)

Same as MetabaseComServer.RegisterApplication2(), with the ability to specify up to three application shortcuts that get generated when application is registered. Shortcuts can be create using GetShortcut() or GetShortcutDisp() methods.

Parameters:
aspNetVersion
run32bitOnx64
application
shortcut1Optional.
shortcut2Optional.
shortcut3Optional.
void UWS.Configuration.COM.MetabaseComServer2.RegisterApplicationWithShortcuts2Disp ( RuntimeVersion  aspNetVersion,
bool  run32bitOnx64,
object  application,
object  shortcut1,
object  shortcut2,
object  shortcut3 
)

Automation/IDipatch/VBS version of the RegisterApplicationWithShortcuts2() method.

Parameters:
aspNetVersion
run32bitOnx64
application
shortcut1Optional.
shortcut2Optional.
shortcut3Optional.
void UWS.Configuration.COM.MetabaseComServer2.RegisterApplicationWithShortcutsDisp ( RuntimeVersion  aspNetVersion,
bool  run32bitOnx64,
bool  useDefaultSharedHostProcess,
ProcessIdentity  processIdentity,
object  application,
object  shortcut1,
object  shortcut2,
object  shortcut3 
)

Automation/IDipatch/VBS version of the RegisterApplicationWithShortcuts() method.

Parameters:
aspNetVersion
run32bitOnx64
useDefaultSharedHostProcess
processIdentity
application
shortcut1Optional.
shortcut2Optional.
shortcut3Optional.
bool UWS.Configuration.COM.MetabaseComServer2.WaitForAppToStart ( string  appID,
int  timeoutMilliseconds = -1 
)

Allows waiting for an application to come online. Returns true when application responded, and false if timed out or application not found.

Parameters:
appID
timeoutMillisecondsIf negative, will be trying indefinitely. If 0, will make one attempt to reach the app, and if positive, will be making attempts for the duration of the specified time period.
Returns:

Property Documentation

IMetabaseComServer1 UWS.Configuration.COM.MetabaseComServer2.Base [get]

For Automation/IDispatch/VBS clients, returns reference to IMetabaseComServer1 interface (MetabaseComServer object).

 All Classes Namespaces Functions Enumerations Properties