Carlisle ended their run of 29 league games without a draw in a typically tough encounter at Bootham Crescent as both sides missed chances to take the full share of the spoils.
York started on the attack and a free kick from Ilesanmi was half cleared by O'Hanlon into Halliday's path. He crossed low and Grainger was there to block Sinclair's shot.
A Carlisle counter attack brought their first chance of the afternoon when Potts robbed Ilesanmi of possession on the half way line. He pushed forward but his shot from distance was blocked. Wyke recovered it and the home side had to clear as Rigg lurked at the front stick.
The Minstermen had a sustained spell of pressure as they peppered the box from left and right but O'Hanlon was there to twice nod it clear as he marshalled the back line.
An intricate free kick routine caused confusion in the visiting box and it eventually fell for Carson with his back to goal. He spun and shot but Grainger was well placed to loft it clear.
Sinclair went for the spectacular as a deep corner dropped out of the sky, but his overhead kick went straight at Grainger and the defender reacted first to send it out of the danger area.
Zubar sent the ball over his own bar as Carlisle tried to get a foothold with a Dempsey cross, and the resulting corner brought a fierce volley from Kennedy which took two deflections before it was finally scooped away.
The Cumbrians should have scored on 27 minutes when Kennedy sent an inch perfect free kick to the far post. Striker Charlie Wyke was completely unmarked as he bent his run but he made it easy for the keeper as he popped his close range header right into his hands.
York were next to be wasteful when Halliday arrived late at the far post for another deep set piece. He had time on his hands but he rushed his volley and sent it back across the face of goal instead of at the target.
Wyke dragged a shot on the turn wide as he tried to bully his way into the box and another teasing free kick from Grainger had York stretched as they battled to get it clear. A miscue from Potts fell kindly for Dempsey but Olejnik was on hand, once again, to gather it into his chest.
One touch football opened things up briefly for Halliday, when he raced onto a clip from Carson, but he couldn't keep the volley down as he went for broke from the edge of the area.
Rigg almost nicked a goal within 30 seconds of the second half restart when he kept his eye on a high bouncing ball. His touch gave him room to shoot but he could only send it wide from a very tight angle.
Potts had a penalty appeal turned down as he went shoulder to shoulder inside the box, but Hanford had to be at his best at the other end when a cross from Hyde broke to Coulson. The rasping effort was bound for the roof of the net until the keeper intervened with a fine fingertip save.
Carson and Lowe blazed wild efforts over the bar as York continued to pump balls forward, and Grainger, O'Hanlon and Archibald-Henville completed a trio of amazing goal line clearances as Coulthirst and Carson waited to celebrate.
A low cross from Carson was turned over his own bar by O'Hanlon as York tried to up the pace, and it was edge of the seats stuff as Coulson broke through in time added on. Another last ditch block prevented him from stealing the headlines.
United - O'Hanlon (77)
York City - Olejnik, McCoy, Zubar, Lowe, Ilesanmi, Coulson, Penn, Halliday, Carson (De Girolamo 85), Sinclair, Hyde (Coulthirst 56). Subs - Ingham, McCombe, Montrose, Platt, Meikle.
Carlisle United - Hanford, Young, O'Hanlon, Archibald-Henville, Grainger, Potts (Corry 64), Kennedy, Griffith (Paynter 71), Dempsey, Rigg, Wyke (Beck 83). Subs - Spiegel, Amoo, Meppen-Walter, Brough.
Referee - Mr Andrew Madley
Attendance - 4,270 (1,219 away fans)