I think you're picking on this because it's Microsoft, and because it's written for an audience of Visual Basic programmers.
I think you're picking on this because it's Microsoft, and because it's written for an audience of Visual Basic programmers.
Are there things any ASP.NET app should be doing before using evasion techniques to avoid XSS? Sure. For what it's worth, the best practice is output filtering, not simple input validation.
Does this make the MSDN article "crazy"? Of course not. This is another layer of defense, and it's not a totally inappropriate one for an internal app, even if I'd never recommend it to a client.
Stop picking on the VB.NET developers. They have different problems than you do.
The simple solution of validating input and generating the right output, like parameter binding instead of string concatenation to prevent sql injection attacks, should be sufficient, and compliant to other www features. The article basically could've been a page shorter.
It also avoids the real solution of simply validating and escaping user-entered data, a much more common and secure method of preventing XSS exploits.
We need to snap out of the meme that internal enteprise apps are built to the same community standards as Wikipedia and Amazon Web Services. A lot of internal apps are just HTML forms hooked up to databases, replacing ancient VB MFC applications that only run on Windows. Stop penalizing VB developers for trying to get their stuff working in a browser without exposing all their data.
I don't fault any enterprise devs for trying to get stuff working and I understand they have a different set of working requirements than someone working on a consumer web app. I do fault MS for putting out "guidance" like this that will just be a waste of resources and a maintenance nightmare for corporate devs that don't know any better.