Asalanka, who was in full attacking mood, completed his half-century off 50 balls by hitting a six over deep midwicket off left-arm spinner Taijul Islam.
But Bangladesh came back into the game by dismissing those two set batsmen in consecutive overs.
Off-spinner Mehdi Hasan Miraz took the wicket of Nissanka before Taskin, who finished with 2-49, made a successful review to dismiss Asalanka as Sri Lanka were 52 runs away from victory.
However, Wanindu Hasaranga smashed 25 off 16 balls with one four and two sixes as Sri Lanka dashed Bangladesh's hopes of winning the series with one game to spare.
The decisive third match of the series is on Monday.
