In full: Scottish League Cup second round draw
The Pittodrie date will be the first meeting between the sides since the Dons won their 2010 meeting at Recreation Park 3-0.
That night, it was Hartley who opened the scoring for Aberdeen from the penalty spot in a game that was marred by an injury to Fraser Fyvie.
Advertisement
Hide AdAdvertisement
Hide AdHartley also scored in the next round in a 3-2 victory over Raith Rovers and then hit a double to defeat Falkirk as Aberdeen reached the semi-final stage, where they were comprehensively beaten 4-1 by Celtic.
The former Scotland international had taken yesterday afternoon to play golf. However, Alloa secretary Ewan Cameron said: “It is a tough tie, especially away from home, but it is one we will look forward to. I am sure Paul will enjoy going back to Aberdeen where he is extremely highly thought of.
“One thing for sure is that Aberdeen will be facing a very well-organised side. Paul will make sure of that.”
Forfar’s reward for defeating Rangers is an away tie against Dundee.
Station Park boss Dick Campbell said: “We played them in a pre-season friendly and also met them in a Ramsdens Cup tie the week before. John Brown and I will have no surprises left for each other by this meeting.”
The highest seeds, Dundee United, travel to Dumbarton while Hearts head for Kirkcaldy in an exciting-looking tie – former Tynecastle forwards Calum Elliot and Gordon Smith are in the Stark’s Park ranks. Falkirk host a derby encounter with Dunfermline.
Draw
Morton v Montrose
Stranraer v Ross County
Dundee v Forfar Athletic
Dumbarton v Dundee United
Kilmarnock v Hamilton Accies
Airdrieonians v Livingston
Partick Thistle v Cowdenbeath
Queen of the South v St Mirren
Aberdeen v Alloa Athletic
Raith Rovers v Hearts
Falkirk v Dunfermline Athletic
(Ties to be played 27/28 August)