Steve Morison broke clear of the last defender to bear down on goal but his effort was expertly cleared off the line by Shaun Pejic.
Midfielder Andy Drury was next to trouble the Minstermen, dinking an effort over keeper Michael Ingham, but ultimately over the bar.
Boro, who finished their Blue Square Premier campaign 29 points above York, continued to dominate, with Morison beating Pejic for pace but seeing his shot well saved by Ingham who got down quickly to deny the striker.
York were second-best to the loose balls, with their midfield struggling to create chances and dominate the middle of the pitch.
Despite Boro's superiority, York almost took the lead at the end of the opening period, firstly when striker Daniel McBreen fired in an effort that was blocked by keeper Chris Day, and secondly with Mark Greaves firing over.
City had a big shout for handball in the second-half when a shot on goal from Richard Brodie hit Michael Bostwick's outstretched hand, but referee Mike Jones waved away the protests.
A ferocious strike from Peter Vincenti was finger-tipped past the post by Ingham, and the 21-year-old Stevenage attacker could do nothing but beat the ground in frustration at the keeper's cat-like reflexes.
It was left to Boro's top scorer Steve Morison to break the deadlock when he reacted first to a loose ball from a corner and fired in beyond Ingham.
The goal was his 31st in all competitions this season, but he was not finished yet, and capped off a man-of-the-match display by taking a quick throw-in to set up Lee Boylan in injury time.
The 30-year-old striker lifted the ball over the York keeper to seal a deserved victory for Boro, and provide them with the perfect consolation following Monday's play-off disappointment against Cambridge.
Bookmark with:
What are these?