Reputation: 1536
We have numerous small applications in our organization, most of them .NET web applications. Each of these has a seperate authorization system.
I would like to create 1 library of functions to do authorization checks to use in all these applications.
I would like to have this library centralized, so that if i want to make changes to it, i don't have to go in each application seperatly and update the reference.
What would be a good way of doing this, or should I take a different approach?
PS: Since I will be looking to use this concept also for other situations, I'm not looking for authorization specific solutions.
Upvotes: 0
Views: 286
Reputation: 6961
Don't do this.
Everything will be fine for ages, and then an error will creep in and all your sites will go down at once. Instead look at automating your build, test and deploy cycle with tools like TeamCity, NUnit and OctopusDeploy that so that you can regression test each and every app, then deploy the new tested package (i.e. web site + security dll) quickly and easily.
The way I would do this is to pull your library out into a separate dll and start using in one application (I'll assume this is of course fully unit tested :-) ). Next use NuGet to build yourself a package containing the dll. You can host the Nuget package (just put it on a share to start with) and then re-use it all your other applications.
Upvotes: 1