John-Joe O’Toole and Marc Richards both notched as Northampton clinched their six successive league win but it could have been a very different outcome had York been less wasteful in front of goal.
Kenny McEvoy and Luke Summerfield both spurned early chances before David Winfield had a header cleared off the line at the start of the second half and from the subsequent counter-attack, Cobblers netted their second.
And things then got worse for the visitors as, just two minutes later, Hendrie saw red for a cynical foul on Ricky Holmes, a decision that left McNamara mystified.
The York boss said: “I thought we started the second half very well and we nearly scored but they broke away and got the second goal which was disappointing because I felt we were on top at the time.
Super Zaib helps Steelbacks to chase down Eagles
Saints players can show what they are made of during hectic start to season
Northamptonshire share spoils with Warwickshire after 'turgid' final day
NORTHANTS CRICKET LEAGUE: All your results and fixtures
Ripley admits Northants will 'have to do it the hard way' as they bid to save game at Lancashire
“Then we lost a player from another corner on the breakaway which I’ve seen again and it was never a red card.
“I didn’t think it was a red card at the time but I think the referee’s decision was influenced by certain things that went on.
“It’s a professional foul and a yellow card, it happens all the time. It’s inside their half, his feet are down, it’s not dangerous and the lad wasn’t hurt so I think it was the wrong decision.
“I think between the reaction of the Northampton players and the crowd the referee was sometimes influenced with some of the decisions he made.
“Before both goals we had chances that were cleared off the line and I felt the free-kick which led to the corner for their first goal wasn’t a free-kick.”
On his side’s performance, McNamara added: “Having said that, we played for more than 30 minutes against a good side that are top of the league and I thought we were very good and had a few chances to get back into the game and I was pleased with the response.
“They’re a good side who are at the top of the league but I didn’t think there was a big gulf between the teams.
“I was pleased with a lot of things but I was disappointed with the goals we conceded, one from their corner and one from a breakaway from our corner.”