DicomObjects.NET8 Documentation
DicomObjects.DicomWeb Namespace / DicomWebServer Class / Listen Method
The uri on which the server will be listening on
Absolute path to the Certificate file if need to listen on https
Password for the server certificate, CertficatePath must also be set
Control if DicomWebServer's Async events are fired. Default value is false
Instance of IStartup interface implementation which allows the user to use their own startup class in place of the default implementation



In This Topic
    Listen Method (DicomWebServer)
    In This Topic
    Configure a web server to handle DicomWeb. A WebHostBuilder instance will be created internally to do the http listening and handles incoming requests
    Syntax
    'Declaration
     
    
    <AsyncStateMachineAttribute(DicomObjects.DicomWeb.DicomWebServer/d__21)> 
    Public Function Listen( _ 
       ByVal BaseUri As String, _ 
       Optional ByVal CertificatePath As String, _ 
       Optional ByVal CertificatePassword As String, _ 
       Optional ByVal Async As Boolean, _ 
       Optional ByVal CustomStartup As IStartup _ 
    ) As Task
    'Usage
     
    
    Dim instance As DicomWebServer
    Dim BaseUri As String
    Dim CertificatePath As String
    Dim CertificatePassword As String
    Dim Async As Boolean
    Dim CustomStartup As IStartup
    Dim value As Task
     
    value = instance.Listen(BaseUri, CertificatePath, CertificatePassword, Async, CustomStartup)
    [AsyncStateMachine(DicomObjects.DicomWeb.DicomWebServer/d__21)] 
    public Task Listen( 
       string BaseUri, 
       string CertificatePath, 
       string CertificatePassword, 
       bool Async, 
       IStartup CustomStartup 
    )
    [AsyncStateMachine(DicomObjects.DicomWeb.DicomWebServer/d__21)] 
    public: 
    Task^ Listen( 
       String^ BaseUri, 
       String^ CertificatePath, 
       String^ CertificatePassword, 
       bool Async, 
       IStartup^ CustomStartup 
    ) 

    Parameters

    BaseUri
    The uri on which the server will be listening on
    CertificatePath
    Absolute path to the Certificate file if need to listen on https
    CertificatePassword
    Password for the server certificate, CertficatePath must also be set
    Async
    Control if DicomWebServer's Async events are fired. Default value is false
    CustomStartup
    Instance of IStartup interface implementation which allows the user to use their own startup class in place of the default implementation
    Remarks

    The actual coordination with the web interface is handled by the WebHostBuilder object, and this must therefore by created (either in conjunction with a web server, or self-hosting) and must listen on the stated URL, using code like this

    string BaseUri = "http://localhost:81/dicom"; DicomWebServer webServer = new(); webServer.Listen(baseURL, "", ""); webServer.QidoReceived += WebServer_QidoReceived; webServer.StowReceived += WebServer_StowReceived; webServer.WadoReceived += WebServer_WadoReceived;

    The prupose of the BaseUri parameter is simply to provide the details needed for "back links" in bulk data URIs and WADO resposnses

    The prefixes used for the individual services are appended to that base URI as necessary, and are used for the configuration

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also