As soon as Web forces a Save, Sanctuary ends.
The rules say
If the warded creature [...] casts a spell that affects an enemy creature, [...] this spell ends.
Nothing specifies that the spell must affect creatures the moment it is cast. So, you cast Web on an area with an enemy Orc in there. The Orc wasn't affect yet (it's not its turn), so Sanctuary is up. Then a few turns go by where your allies or other enemies move and act, Sanctuary is up. Then it's the Orc's turn, at the beginning of which, he must make a save against the Web spell, and Sanctuary ends at that point.
The idea of Sanctuary (it's even been errata'd to better convey it) is to ensure that you are a sort-of peacekeeper. Enemies have trouble attacking you, but you also cannot be harmful to them.