I have an instance where I need to show a classic ASP page within an ASP.Net page. I didn't want to use an iframe for several reasons, but those aren't the issue here. I searched and searched and finally found some code that would let me do it, available here: http://www.mikesdotnetting.com/Article/49/How-to-read-a-remote-web-page-with-ASP.NET-2.0. I implemented the C# code and found that for the purpose of loading a plain HTML page it works just grand. But, when I try to load a Classic ASP page that way, I get a 500 Server error. The page that I am trying to load works just fine if I load it directly into a browser, or into an iframe, but not using this method.
I'd really like to know what is causing the error so that I can fix it. If I could get the whole error response that the page sends out it would be helpful. I'm just not well-versed in how these classes work deep inside. Should I be setting a user agent or some of the other header values? If so, what should they be set to and how? Any insight would be very appreciated. For completeness, my code follows.
View Complete Post