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:

  1. core
  2. accounting
  3. human resource
  4. 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:

  1. how care solution performance?
  2. 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

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -