He was asked not to visit the bases and hospital as part of his "campaign", which is paying for the European tour btw. He could have gone as a private citizen/senator without the press in tow. All Senators are welcomed on military installations. It seems like the part he didn't like was "without the press". Believe me, there is better security on bases than the venue he chose. The Pentagon felt that if the "campaign" made a stop at the bases and at the hospital it would be seen as a "political maneuver". The "campaign" should have canceled. The "senator" should have gone.
And suppose the "senator" did go. I find it hard to believe that anyone, including you, would have just accepted that at a senator visiting the troops. You would have immediately found something wrong with that visit and still accused him of campaigning.
You are a one trick pony and very transparent.