I started using .NET 2003 and my first application is to parse an HTML form.
But I am behind an ISA firewall and get "(407) Proxy Authentication
Required" with the following code. The proxy settings in webReq.Proxy
appear to be OK, even without setting them as below. IE works, but this
does not. Any ideas? (or where to ask?) -- David
Dim webReq As WebRequest = WebRequest.Crea te(txtUrl.Text)
webReq.Proxy = WebProxy.GetDef aultProxy
Dim webResp As WebResponse = webReq.GetRespo nse
Dim sr As New StreamReader(we bResp.GetRespon seStream, Encoding.ASCII)
Dim html As String = sr.ReadToEnd()
sr.Close() 2 6462
David,
You may want to set the Credentials property of your WebRequest object.
Telmo Sampaio
"davidcbrow n" <dc******@remov ethisfrontierne t.net> wrote in message
news:Op******** ******@tk2msftn gp13.phx.gbl... I started using .NET 2003 and my first application is to parse an HTML
form. But I am behind an ISA firewall and get "(407) Proxy Authentication Required" with the following code. The proxy settings in webReq.Proxy appear to be OK, even without setting them as below. IE works, but this does not. Any ideas? (or where to ask?) -- David
Dim webReq As WebRequest = WebRequest.Crea te(txtUrl.Text) webReq.Proxy = WebProxy.GetDef aultProxy Dim webResp As WebResponse = webReq.GetRespo nse Dim sr As New StreamReader(we bResp.GetRespon seStream, Encoding.ASCII) Dim html As String = sr.ReadToEnd() sr.Close()
Sorry, I should have mentioned that I had tried that too with no success.
David
"Telmo Sampaio" <ts******@gmail .com> wrote in message
news:Om******** ******@TK2MSFTN GP09.phx.gbl... David,
You may want to set the Credentials property of your WebRequest object.
Telmo Sampaio
"davidcbrow n" <dc******@remov ethisfrontierne t.net> wrote in message news:Op******** ******@tk2msftn gp13.phx.gbl... I started using .NET 2003 and my first application is to parse an HTML form. But I am behind an ISA firewall and get "(407) Proxy Authentication Required" with the following code. The proxy settings in webReq.Proxy appear to be OK, even without setting them as below. IE works, but this does not. Any ideas? (or where to ask?) -- David
Dim webReq As WebRequest = WebRequest.Crea te(txtUrl.Text) webReq.Proxy = WebProxy.GetDef aultProxy Dim webResp As WebResponse = webReq.GetRespo nse Dim sr As New StreamReader(we bResp.GetRespon seStream, Encoding.ASCII) Dim html As String = sr.ReadToEnd() sr.Close()
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mark Ferguson |
last post by:
I've been trying to get a simple pycurl script working with an
authenticating proxy, here is the code (with changes to protect the
guilty!):
from pycurl import *
import StringIO
b = StringIO.StringIO()
c = Curl()
|
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: Terry |
last post by:
Hello,
I am trying to get a response for an .aspx page in my current project (same
virtual directory) by using WebRequest.GetResponse but I keep getting a
exception with "500 Internal server error" in the exception message.
I am able to do this fine with another .aspx page that has no code-behind.
The page that has code-behind throws the exception.
What I am doing is getting the .aspx response, reading the stream, replacing
|
by: Wild Wind |
last post by:
Hello all,
I apologise in advance for the long windedness of
this post, but I feel that if I am going to get any
solution to this problem, it is important that I present
as much information that will be useful in diagnosing
the problem.
I have an application which calls a method of a web service
that we host remotely. I have deployed the application to a
|
by: Jensen Bredhal |
last post by:
Hello,
I need to send command to a web server from a method.
I understand this should be possible using the WebClient or WebRequest
class.
how can this be done?
below an example of my HTTP based command to the server:
| |
by: rcp |
last post by:
Hi all,
I've read all posts from all existing threads and none of them worked
to solve my problem, although its exactly the same. I'll try to
explain my case and see if a kind soul could help me out:
I've a win32 service in C# on a client machine A, which accesses a WS
(C#) on a server machine B (hosted on an IIS)
Case 1:
If I try to add the WSDL for the WS through VS2005, the 'Discovery
|
by: Boni |
last post by:
I want consuming a webserivce trough a proxy. I use this code.
myService s = new myService ();
System.Net.WebProxy proxyObject = new
System.Net.WebProxy("http://proxyhost:8080");
s.Proxy = proxyObject;
It doesn't works, it returns a error
HTTP 407: Proxy Authentication Required ( Access is denied. ).
But my proxy don't need a user Authentication.
|
by: chandru1782 |
last post by:
Dear friends,
I am trying to use CPAN for installing some perl modules. i am using a ubuntu system, which has internet connection through lan and authenticated proxy.
when trying to install cpan.pm , it gives the following error, can any one help,
You have no /root/.cpan/sources/MIRRORED.BY
I'm trying to fetch one
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
|
by: =?Utf-8?B?TWFyaw==?= |
last post by:
I'm researching what is the best way to create a generic WCF proxy wrapper
that has the following requirements:
1. Remove the System.ServiceModel config section requirement for clients. We
have our own configuration management that follows our application lifecycle
(development/system test/production). Also, most of the proxies we build are
for the middle-tier layer.
2. Create a wrapper to follow WCF Client best practices (proxy.close...
|
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: 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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
| |