c# - Licensing Asp.Net application with Portable.Licensing -
i need protect asp.net web api 2.2
application using portable.licensing. have organized application creating multiple asp.net areas
. ex:
- core
- accounting
- human resource
- inventory
i need licence each , every areas. if customer has purchased accounting module, should able access accounting functionality. otherwise have display error message.
and generate unlike machine key protect software piracy.
so how can use portable licensing asp.net areas? where/at point license needs validated?
could 1 please me achieve requirement providing instructions? providing sample code highly appreciated!.
for wandering same thing:
well, basically, how implement licensing in application - depends! no silver bullet, always.
i spent half of day studying portable.licensing , that's comes mind: in portable.licensing have "withproductfeatures" method in fluent api adding custom data license, , areas - product features. insert check - depends on number of factors:
- how care solution performance?
- how care people cracking il?
if care more performance people changing assemblies , getting cracked version - can save available feature data license cache , access in:
- every method of webapi controller
- basic controller webapi controllers (onactionexecuting candidate)
- in filter webapi (here nice example)
and if consider trying harder protect code - spread license data checking calls across these places, , add them using fody (i planning on implementing it, no code sample - library reference here) - don't make life of pirates easy changing il of 1 method :)
Comments
Post a Comment