Yes it will work. I have had a couple done that way. DO NOT drill all the way through the chamber area. It is possible to safely do it on on SOME barrels but not all, it depends on the thickness of the chamber area, the thicker the better. The newer barrels are thicker and therefore better to use. My gunsmith used to do it but so many sent him fine older thinner barrels that he had to send back without doing he stopped doing them.
Redrill the holes in the scope rail and use larger screws, I think he went from the 6/48's that came with the rail to 8/40's but don't hold me to it. There is an old post of mine somewhere that has all the info. Do a search for "Ed Gagnon" in the shotgun section and you might be able to find it. He bottom tapped the holes, flat filed the new 8/40 screws to the exact and proper length for full thread engagment and complete tight scope rail mounting, and expoxied AND screwed the base (scope rail) on, not to be removed...It's possible and safe on SOME 12 gauge barrels, and when done correctly and safely it works GREAT, if not it can be dangerous...Good Luck....<><.... :grin: