How to implement license control in a WCF served by IIS

I am creating a new WCF service that requires a “run" license. I wonder how to do this without checking the license in each operation of the service contract.

Basically, I want to perform a license check when initializing the service. If I implement a license check in the constructor of the service contract, I am afraid that it will act strange if it is hosted in IIS (which will be the main type of host).

Any ideas on how to do this?

+3
source share
1 answer

, "" - HTTP- IIS. "" , - :

Public Sub New()
    If notLicensed then
        throw new Exception("Not Licensed")
    End if
End Sub

, ( , ), , . , , - .:)

+1

Source: https://habr.com/ru/post/1787932/


All Articles