I've hunted hundreds of parks, town squares and courthouses over the years and have encountered few problems. If I was told to leave I did so respectfully and quickly, but I always inquired as to why I wasn't allowed to hunt. Many times I tell them I had hunted there years ago with permission and wasn't aware that they had made it off limits since then. There have been several instances where I convinced the officer I wasn't a threat to the property or demonstrated my digging techniques and they made an exception for me so that I could continue hunting. Most of the time they are cordial and friendly, especially after deciding that you are not a threat to anyone, but occasionally you get one that is rude or condescending and I attribute that to someone not having a good day, getting tired of running off detectorists, or just plain being a jerk.
Just make sure that the place is not posted against detecting or digging before you hunt...they won't be compelled to do anything to you other than warn you if they see you (assuming, of course, you aren't leaving holes or other visible damage). Always act respectfully towards them "Yes sir - No sir" and be apologetic for causing any problem. DO NOT be confrontational in any manner - If you don't agree with the officer, he is not the one to question... contact his superior or a city official to inquire about a law or complain about the officer.
I have yet to be threatened with arrest or any kind of negative action - and I've hunted in some real backwater places before - so I don't worry about getting the boot. There is always many other good places to try. Like GOLDDIGGER said below... asking anyone directly for permission usually makes them say "NO" even when they don't have a clue about the law... they just don't want to be liable for giving you permission, or angering their boss is all.
Since you are on public land you should be able to assume that if there is no posting against detecting, digging, or historical/archaeological designations that you should have a right to hunt there until told otherwise... if that locality is serious about their laws, it will be posted where you can see it.
I hunted a couple places that, unknown to me, had been off limits for decades, but noone remembered the rules and the signs disappeared long ago so I was able to talk the officer into letting me hunt because I was nice and I demonstrated my digging technique to prove that I would leave no signs of digging anywhere... and I was rewarded with many great finds.
Another thing I have found is that most of the time when I get run out of a place, it wasn't the cop who personally witnessed me digging but a citizen who phoned in a complaint to police station. The officer is only doing his job by running me off and that officer will always place a higher value on a citizen's complaint over my legal right to enjoy my hobby. Every single time there was a citizen complaining about me, they never approached me in person first to inquire about my activities and most just saw me out of their window or their car when I was down recovering a target. That is why I make a habit of spending as little time digging a target as possible, and if I have multiple targets or a large number of signals to dig, I will stand a few minutes every now and then to take a break and survey my surroundings to make sure I'm not being watched by some "concerned citizen" who may be concerned with me "digging a lot of holes".
Hope this info helps... Take care and HH, Mike.