I need the following attached file converted to working .NET
Here is what the code does and should do:
[1] 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.
[2] Make an HTTP connect from within the script to a remote server (sending the result from [1] 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
[3] Display the result from the remote URL