Disabling request validation in ASP.NET
I recently tried running one of our web applications on ASP.NET 1.1 for the first time. This is a sample app that we ship to customers to show them how to interact with our web service. There's one page in the app that constructs some XML on the client side and submits it to the server in a hidden form field. The new ASP.NET request validation feature didn't like that too much, and threw up an error. A quick Google pointed me at two different ways to disable this option - a page directive to disable it at the page, and a web.config setting to disable it for the app.
Great, I thought, I'll just disable the check for that page. I tried the page directive on ASP.NET 1.1, and it worked fine. I tried it on ASP.NET 1.0, and it barfed. Apparently it doesn't like directive attributes that it doesn't know about.
Next I tried the web.config setting. Same deal. ASP.NET barfs on a web.config setting that it doesn't know about. I guess MS doesn't buy into the whole "ignore what you don't understand" philosophy of forward compatibility.
So I'm stuck. The web app doesn't require 1.1, but I can't have the same code that works on both 1.0 and 1.1. I guess I have to just document that if they are running the app on 1.1, they need to manually edit the page and add the directive.
That stinks.