I need the following attached file converted to working .NET
Here is what the code does and should do:
 Figure out the URL of the page where the code is nested. Taking into consideration any server site URL rewrites etc. In Apache mod_rewrite might be enabled, in IIS there might be something similar.
 Make an HTTP connect from within the script to a remote server (sending the result from  above as a parameter). There should be backups of several different connection methods in case the server does not allow one or the other. There should be a timeout of 5 secconds on the connection
 Display the result from the remote URL