松野の家名を汚すことがないようにお願いしますよ。
松野の家名を汚すことのないようにお願いしますよ。
Both are correct and mean the same thing. (~ことのないように sounds a tiny bit more formal to me..)
ように is the continuative form of the auxiliary ようだ. ようだ comes from the noun [様]{よう} + the copula だ. Since the よう is originally a noun, it can act like a noun and can be a head noun of a relative clause.
{松野の家名を汚すことが/のない}よう(に)
lit. (in) the way/manner [that you don't dishonor the name of the Matsuno family]
→ so as not to dishonor the name of the Matsuno family
You could see 松野の家名を汚すことがない as a relative clause that modifies the noun よう.
It has the same structure as:
{日本人が/の知らない}日本語
the Japanese language [that Japanese people don't know]
For more on the が-の conversion, see: How does the の work in 「日本人の知らない日本語」?