Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Browser.Run Method

Launches a synchronous instance of the VoiceXML Browser and specifies the URI of the VoiceXML start page to load, and a CookieContainer parameter.

Namespace:  Microsoft.Speech.VoiceXml
Assembly:  Microsoft.Speech.VoiceXml (in Microsoft.Speech.VoiceXml.dll)

Syntax

'Declaration
Public Function Run ( _
    vxmlPage As Uri, _
    container As CookieContainer _
) As VoiceXmlResult
'Usage
Dim instance As Browser
Dim vxmlPage As Uri
Dim container As CookieContainer
Dim returnValue As VoiceXmlResult

returnValue = instance.Run(vxmlPage, container)
public VoiceXmlResult Run(
    Uri vxmlPage,
    CookieContainer container
)

Parameters

  • vxmlPage
    Type: System.Uri
    The URI of the VoiceXML start page to load.
  • container
    Type: System.Net.CookieContainer
    Contains state information associated with a request for a VoiceXML page. The value can be null.

Return Value

Type: Microsoft.Speech.VoiceXml.Common.VoiceXmlResult
A VoiceXMLResult object that references the synchronous operation.

Exceptions

Exception Condition
ArgumentNullException

Thrown when the Run method is called and the URI of the VoiceXML start page to load contains a null argument value.

InvalidOperationException

Thrown when the Run method is called on a Browser instance that is running.

Remarks

When initiated, the Run method checks the value of the Browser's State property to determine if the Browser is already running. If Browser.State equals Active, then the Browser is running and the Run method throws an InvalidOperationException. If Browser.State equals Idle, then the Run method sets Browser.State to Active and launches the Browser instance.

You can instantiate and run multiple Browser objects simultaneously, for example Browser1, Browser2, Browser3. You cannot run the same Browser instance concurrently on multiple sessions, for example Browser1(a), Browser1(b), Browser1(c).

Upon successful completion of a VoiceXML page, the Run method returns a VoiceXmlResult object, which may include a CookieContainer object with state information about the session for use by the Web server serving the VoiceXML documents.

If the session completes without errors, that is if the ExitReason value is HostExitRequested, ExitElementEncountered, or DialogEndEncountered, then the UnhandledThrowElement will be null.

See Also

Reference

Browser Class

Browser Members

Microsoft.Speech.VoiceXml Namespace