Je sais this is an old question, mais in IIS 7.5 you can deny by user agent si you use Request Filtering.
In IIS, allez dans le website you wish to apply le filter et alors in le right pane, click le Request Filtering icon. (you may have to enable this feature through server manager).
Click le Rules tab, et alors along le far right list, select "Add Filtering Rule"
Give it a name, et alors in le Scan Headers section, put "User-Agent".
Vous pouvez ajoutez unny spécifique file type(s) to block in Applies To, ou you can leave it blank to make it apply to tous file types.
In Deny Strings, enter tous of le user agent strings you want to block. In le case of this question, you would put "Yandex" here.
I confirmed these changes in chrome using le User Agent Switcher extension.