473,385 Members | 1,780 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,385 software developers and data experts.

Displaying External Web Site via Intranet

We have approximately 90 computer users, but only 13 have internet access,
the rest are not configured to browse the internet. We want to display
certain web sites to all users without reconfiguring their pcs. Is there a
way to have our intranet web server retrieve the external page and then
display the results to the user?

Thanks.
May 10 '06 #1
2 1509
Hi John,
From what I understand you want to load a webpage on the server, and

display the contents in your own site. I found something that should do
it for you:

---Create the request
Dim WebRequest As System.Net.WebRequest =
System.Net.WebRequest.Create(New Uri(CurrentLink))
WebRequest.Timeout = 2000

'---Get the response produced by the request
Dim Response As System.Net.WebResponse = WebRequest.GetResponse

'---Download the page content into a stream
Dim Stream As System.IO.Stream = Response.GetResponseStream

'---Place the stream into a stream reader
Dim StreamReader As New System.IO.StreamReader(Stream)

'---Read the stream into a string object
Dim HtmlReceived As String = StreamReader.ReadToEnd

'---Place the string into a literal control
Literal1.Text = HtmlReceived

'---Cleanup
Stream.Close()
StreamReader.Close()
Good luck,
Marcel

May 10 '06 #2
Thanks for the code. it looks like that will work...

"Nenefta" wrote:
Hi John,
From what I understand you want to load a webpage on the server, and

display the contents in your own site. I found something that should do
it for you:

---Create the request
Dim WebRequest As System.Net.WebRequest =
System.Net.WebRequest.Create(New Uri(CurrentLink))
WebRequest.Timeout = 2000

'---Get the response produced by the request
Dim Response As System.Net.WebResponse = WebRequest.GetResponse

'---Download the page content into a stream
Dim Stream As System.IO.Stream = Response.GetResponseStream

'---Place the stream into a stream reader
Dim StreamReader As New System.IO.StreamReader(Stream)

'---Read the stream into a string object
Dim HtmlReceived As String = StreamReader.ReadToEnd

'---Place the string into a literal control
Literal1.Text = HtmlReceived

'---Cleanup
Stream.Close()
StreamReader.Close()
Good luck,
Marcel

May 10 '06 #3

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

Similar topics

3
by: Rob Locher | last post by:
I have a server running NT 4 Server that is on my local domain that hosts an ASP application. I have a problem: when I try to test the ASP application from a computer on the same domain running...
0
by: Chad A. Beckner | last post by:
I am starting to work on implementing ASP.NET (using VS.NET Dev 2003) into our current ASP 3.0 intranet setup. We have several (say 15 - 20) "applications" that are run within our intranet, which...
64
by: Dave | last post by:
A friend of mine pointed out the other day that certain elements on my web site are too small. But in most of what I publish, fonts are at default size or smaller, and my images are easy to see. I...
3
by: sonic | last post by:
Hi, displaying information on a page as MS Word document seems to be as simple as: //OnLoad Response.ContentType = "application/msword"; Response.Write ( MyContentString ); (this assuming...
11
by: musosdev | last post by:
Hi guys I'm still working through my conversion to VS2005, I'm getting there, but there's a couple of errors I can't fix. My project uses a couple of external controls (not written by me),...
1
by: DrShevek | last post by:
Hi, Apologies if this has been discussed before but I have tried to search and found nothing really helpful as I am not entirely sure exactly what to search for..! Is it possible to detect...
2
by: Smokey Grindel | last post by:
Say I have one site that has this structure http://localhost/ <- public side http://localhost/internet <- private part of same site protected using NT Authorization so say I have two host...
5
by: =?Utf-8?B?U3R1YXJ0?= | last post by:
Hi There I have been having a play around with the following code to display a datagrid in Excel (all from Steve Orr's site): Private Sub btnTechServAccred_Click(ByVal sender As System.Object,...
0
by: =?Utf-8?B?Sm9obiBEYWx5?= | last post by:
Is there a way to use an internal server as a passthrough to provide access to an external web site? The problem is as follows: we have approximately 12 users that have internet access in our...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.