<p>I'm using the following code to make sure all certificates pass, even invalid ones, but I would like to know if there is a better way, as this event gets called globally and I only want the certificate to pass for a certain HTTP call and not for any others that are happening asynchronously.</p>

<pre><code>// This delegate makes sure that non-validating SSL certificates are passed
ServicePointManager.ServerCertificateValidationCallback = delegate(object certsender, X509Certificate cert, X509Chain chain, System.Net.Security.SslPolicyErrors error)
{
   return true;
};
</code></pre>

<p>The code above is just an example of ignoring any non-validation on the certificate. The problem that I'm having is that it is a <strong>global</strong> event. I can't see  which session the event is happening for. I might have a couple of http requests going through and I want to ask the user for an action <strong>for each request</strong>.</p>

I have recently been looking into this issue but without the same requirements that you have.  I haven't seen a script that does what you want but have you considered instead checking if .NET 2.0 is installed and if not then prompt them to download it.  You can open a URL in the default browser and get the user to attempt the install again once the framework has been installed.
This is not an ideal situation from a user perspective but i think going with what your planning you will have to write some complex stuff to handle the different language constraints just to get it working.
Just my 2 cents.