Last post Dec 06, 2006 12:32 PM by OWScott
Dec 05, 2006 04:17 PM|curtisdehaven|LINK
Ok, granted, this one's way out there - you have an answer though?! We have a custom-coded service that runs on a server. It acts as a bridge - it accepts http requests, communicates with some third party custom computer and returns markup back to the
client for display. The problem is it doesnt support any of the popular encryption techniques being used today - short of figuring out how to code for that in our service...
So, is there a way we can put an asp/aspx file in the middle? That is, let the browser hit the aspx page, let IIS handle all the decryption, pass the request on the aspx page, let that then pass the request onto our custom service and return whatever that
returns back to the client?
I considered using a plain redirect, but that redirected request would come all the way from the client - I'd like to keep that traffic on the server. The client should never know this "forwarding" is even going on.
Thanks for any ideas! -- Curt
Dec 05, 2006 05:54 PM|mokeefe|LINK
Presumably with a page encrypted by SSL - funny place you chose to post this one.
Example expects Button1 as ASP Button.
As String = String.Empty
Protected Sub Button1_Click(ByVal sender
ByVal e As System.EventArgs)
'If Not Roles.IsUserInRole("HasAccess") Then
' Exit Sub
Dim ServiceURL As
String = "http://www.google.com"
Dim rq As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(ServiceURL)
Dim frmsCookie As HttpCookie = Request.Cookies(FormsAuthentication.FormsCookieName)
Dim rsp As System.Net.HttpWebResponse = rq.GetResponse()
Dim strm As System.IO.Stream = rsp.GetResponseStream()
Dim strmRdr As
Me.ServiceResponse = strmRdr.ReadToEnd()
Sub Render(ByVal writer
' Renders only Service Response
' Renders this page as normal
' This actual page could contain invalid account details information
Dec 06, 2006 12:32 PM|OWScott|LINK
I would say Martin is on the right track. What you would need is a web service or a screen/service scrape so that the ASP/ASPX in the middle is always being used. In other words, a redirect wouldn't work, unless you built something in the service that
said that it wouldn't response to any queries unless a particular token was passed to it. (which is probably the more difficult option) Having a ASP.NET web service calling your custom service should do the trick as long as your service will accomidate that.