473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

HTML proxying in ASP.NET?

We have an app that is written in C#/ASP.NET 2.0, and hosted on IIS.

Or rather, it's mostly written in ASP.NET, but parts of it are client-
side javascript, pulling data from an Apache webserver in an ajax-like
fashion.

There is no chance of converting the Apache pages to run on IIS, or the
IIS pages to run on Apache, so we're inherently stuck with cross-domain
XMLHttpRequest() calls.

To this point, we've been running both IIS and Apache on different ports
on the same servers, and have had no problem. But we are concerned that
we will begin to see browsers that will reject calls to different ports.
And beyond that, we'd really like to try hosting Apache on a separate
box, better tuned for the sort of load that's being put on it.

That means we need a Web Proxy. And one that will run on IIS, and that
we can build, and maintain, with our current tool set (ASP.NET).

Problem is I've not been able to find one. There are plenty of simple
web proxies out there for Apache, and written in PHP, or CGI. But I've
not found an example of a simple web proxy for IIS written in ASP.NET.

I know people have had to have done this. But I've not been able to find
anything on the web. Is there some simple solution I've missed?

--
The government consists of a gang of men exactly like you and me. They
have, taking one with another, no special talent for the business of
government; they have only a talent for getting and holding office. Their
principal device to that end is to search out groups who pant and pine
for something they can't get and to promise to give it to them. Nine times
out of ten that promise is worth nothing. The tenth time is made good by
looting A to satisfy B. In other words, government is a broker in pillage,
and every election is sort of an advance auction sale of stolen goods.
- H. L. Mencken
Oct 2 '07 #1
3 1238
Have you considered communicating server-to-server with ASP.net web
services and (for example) PHP with NuSOAP? You might be able to skip
the JavaScript altogether.

-Mike Placentra II
On Oct 2, 11:22 am, Jeff Dege <jd...@jdege.visi.comwrote:
We have an app that is written in C#/ASP.NET 2.0, and hosted on IIS.

Or rather, it's mostly written in ASP.NET, but parts of it are client-
side javascript, pulling data from an Apache webserver in an ajax-like
fashion.

There is no chance of converting the Apache pages to run on IIS, or the
IIS pages to run on Apache, so we're inherently stuck with cross-domain
XMLHttpRequest() calls.

To this point, we've been running both IIS and Apache on different ports
on the same servers, and have had no problem. But we are concerned that
we will begin to see browsers that will reject calls to different ports.
And beyond that, we'd really like to try hosting Apache on a separate
box, better tuned for the sort of load that's being put on it.

That means we need a Web Proxy. And one that will run on IIS, and that
we can build, and maintain, with our current tool set (ASP.NET).

Problem is I've not been able to find one. There are plenty of simple
web proxies out there for Apache, and written in PHP, or CGI. But I've
not found an example of a simple web proxy for IIS written in ASP.NET.

I know people have had to have done this. But I've not been able to find
anything on the web. Is there some simple solution I've missed?

--
The government consists of a gang of men exactly like you and me. They
have, taking one with another, no special talent for the business of
government; they have only a talent for getting and holding office. Their
principal device to that end is to search out groups who pant and pine
for something they can't get and to promise to give it to them. Nine times
out of ten that promise is worth nothing. The tenth time is made good by
looting A to satisfy B. In other words, government is a broker in pillage,
and every election is sort of an advance auction sale of stolen goods.
- H. L. Mencken
Oct 3 '07 #2
On Oct 2, 7:18 pm, Mike Placentra II
<nothingsoriginalontheinter...@gmail.comwrote:
Have you considered communicating server-to-server with ASP.net web
services and (for example) PHP with NuSOAP? You might be able to skip
the JavaScript altogether.
I'm sorry, but that seems non-responsive.

We have javascript on a browser that needs to access data on a
webserver other than the one that served the page that contains the
javascript. I don't see how any server-to-server solution could be
relevant.

The browser gets a page from:

http://server/webapp/page.aspx

The javascript on that page gets images from:

http://server:8080/imageapp.php?x=1&y=2

The problem is that some browsers consider http://server and http://server:8080
to be distinct domains - and over time more and more browsers will do
so.

What we need is a URL like:

http://server/proxy.aspx&uri=http://...pp.php?x=1&y=2

So the request goes to the same domain as the original page, but where
the proxy page we're requesting pulls the page from the URI that is
passed to it as an argument.

There are packages to create proxies like this on Apache readily
available on the net. But we need one that will run on IIS.
Preferably one written in C#/ASP.NET, so we can build it and maintain
it with our current toolset.

This seems like a very simple problem, and I know people have had to
address it - but I've not been able to find any examples.
Oct 3 '07 #3
On Tue, 02 Oct 2007 15:22:53 +0000, Jeff Dege wrote:
Problem is I've not been able to find one. There are plenty of simple
web proxies out there for Apache, and written in PHP, or CGI. But I've
not found an example of a simple web proxy for IIS written in ASP.NET.

I know people have had to have done this. But I've not been able to
find anything on the web. Is there some simple solution I've missed?
I found a discussion of proxying in IIS at:

http://blogs.msdn.com/david.wang/archive/2005/08/01/
HOWTO_Common_URL_Red
irection_Techniques_for_IIS_Summary.aspx

It suggested a commercial package called ISAPI_Rewrite. I've tested it a
bit, and it seems to be working.

--
Want to understand why politicians do what they do? Simple: when you're
a big, gray, greasy rat, walking around on two hind legs, you have a
lot to gain by turning the world into a garbage heap.
-- Memoirs of Lucille G. Kropotkin
Oct 5 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Graeme Matthew | last post by:
Hi all I do a CGI post, I am using CGI.FieldStorage(), I obtain the values etc al works fine. I now need to take the same posted data and resubmit it to a remote server i.e I need to rebuild...
4
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties...
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
7
by: brochu121 | last post by:
Does anyone know of a way to embed python scripts into html, much like you would javascript or php? I do not want to use this to connect to a database, but rather for a functional script to be...
3
by: | last post by:
If there is a better forum in which to post this question, please let me know... I need to know how the src and href attributes are handled in html such as the following: <script...
4
by: adam.waterfield | last post by:
I have a script that 'proxys' a .flv file from a .htaccess protected folder. The proxying script is being called by a Flash flv player in the main webpage. This script works wonderfully in...
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.