I am in need to find a way to get the HTML from an internal URL.
For example: I have page : default.aspx?pa ge=Test, I need to get HTML of
that page after rendering.
At first thought, I would use WebRequest to make a requestion, then use
WebResponse to get the HTML. However, it won't work in my situation.
The resaon for that is:
WebRequestion needs a URI, which is in the format of
http://<MyDomainName >/deafult.aspx?pa ge=Test ...
In my particular situation, the web server does not recogonize MyDomainName
(an external domain name), so if I put:
Dim req As WebRequest =
WebRequest.Crea te("http://MyDomainName/Default.aspx?pa ge=Test") , error will
occur.
Is there any way to achieve what WebRequest and WebResponse can achieve, but
requires a relative URL?
Thanks 1 2367
John wrote: I am in need to find a way to get the HTML from an internal URL. For example: I have page : default.aspx?pa ge=Test, I need to get HTML of that page after rendering.
At first thought, I would use WebRequest to make a requestion, then use WebResponse to get the HTML. However, it won't work in my situation. The resaon for that is: WebRequestion needs a URI, which is in the format of http://<MyDomainName >/deafult.aspx?pa ge=Test ... In my particular situation, the web server does not recogonize MyDomainName (an external domain name), so if I put: Dim req As WebRequest = WebRequest.Crea te("http://MyDomainName/Default.aspx?pa ge=Test") , error will occur.
Is there any way to achieve what WebRequest and WebResponse can achieve, but requires a relative URL?
Can't you use localhost or an IP address?
Cheers,
-- http://www.joergjooss.de
mailto:ne****** **@joergjooss.d e This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Peter |
last post by:
Hi
I am trying to do very simple http client that requires a login, copy cookie snet by a server and does a request with the cookies. WebRequest->CookieContainer/WebResponse->Cookies does not seems to handle cookie correctly.
User case: If a server send back cookies in headers that looks like following
Set-Cookie: a=assss
Set-Cookie: b=asddas
...
|
by: Stephen Miller |
last post by:
I have an ASPX report and I want to capture the rendered HTML and
write to a file on the webserver. Several posts suggest using
WebRequest to make a second call to the page, and screen-scrape the
resulting HTML. The technique typically described is:
'-- Get the current URL and request page
Dim url As String =
System.Web.HttpContext.Current.Request.Url.AbsoluteUri
Dim req As System.Net.WebRequest = System.Net.WebRequest.Create(url)
|
by: John K. |
last post by:
Hi
I was wondering if it's possible to use the WebRequest class to access a file on windows shared folder with authentication? If yes, what would the syntax be? I've tried to look this up in the references available but to no avail
Also, is it safer (better practise) in an LAN environment to use HTTP requests to access shared files (via ASP.NET) rather than UNC file shares
TIA
Regards
John
|
by: news |
last post by:
I am trying to get at the source of a web page. Looking at the innerHTML element is only part of the story. In IE, right-clicking on various different parts of the page gives me different results when I click on view_source.
The source I need is contained inside IFRAME tags (which contain references to jsp pages)... The html content isn't available when I look at the innerHTML of the document returned in the DocumentComplete event of the...
|
by: ThyRock |
last post by:
I am working on a WebRequest accessing the US Postal Service WebTools test API.
This service uses a DLL file (ShippingAPITest.dll) with a query string which
includes XML.
The web service accepts the query string with no url encoding.
I must pass the <> characters as they are in the query string.
If these characters are url encoded the service rejects the request.
This API Url is
http://testing.shippingapis.com/ShippingAPITest.dll
| |
by: kkb |
last post by:
Hello!
First, I'm sorry because of my english... I'll try to be
understandable!
I've got a strange problem using .NET 2003 C# and I haven't figured it
out for a long time. I'm implementing an application to download images
using System.NET classes (webclient, webrequest) asynchronously behind
proxy server. The reading method works like this:
System.Net.WebClient client=new System.Net.WebClient();
|
by: Mr Flibble |
last post by:
OK I logon to a web site and I manage to get an SMSESSION cookie that I
then store in a variable called _session (a class scoping variable). I
do this by calling a logon URL and setting a cookie to SMCHALLANGE=YES
to allow me to obtain a session. I then iterate the cookie collection
to extract the SMSESSION value. All is good (so far). This is when the
sky turns grey and the rain starts to fall. I then use this SMSESSION
in a web...
|
by: Shashank |
last post by:
Hi all,
I am a new member of this community.
I am making a http request to a html file placed on a Apache server.
On this page there is an embeded perl statement which requires
reading environment variables from the server.
When I am typing the url of the html page in my browser, I am able to
read the Environment variables from the server and getting the desired
results.
But, when I am making Http request through my window application,...
|
by: Zytan |
last post by:
I know that WebRequest.GetResponse can throw WebException from
internet tutorials. However in the MSDN docs:
http://msdn2.microsoft.com/en-us/library/system.net.webrequest.getresponse.aspx
It only lists NotImplementedException in the Exceptions section.
(Note that it does mention WebException in the Remarks section, but
who knows if this is always the case for such classes, and thus
perhaps they can't be trusted to always list these, and...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |