473,583 Members | 3,155 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot Authenticate with Proxy Server

I am trying to use HTTPWebRequest from my application, but I cannot seem to
authenticate with my proxy server.

My GetResponse statement fails with an Error 407, "Proxy Authentication
Required". I am trying to use my default windows credentials which are used
by Internet Explorer. I have also manually supplied credentials with no
luck. This code was downloaded from a Microsoft web page.

Here is my code:

Dim strURL As String
strURL = "http://www.microsoft.c om"

Dim wrGETURL As WebRequest
wrGETURL = WebRequest.Crea te(strURL)

'Use default proxy settings from Internet Explorer
wrGETURL.Proxy = WebProxy.GetDef aultProxy()
wrGETURL.Creden tials = CredentialCache .DefaultCredent ials

Dim objStream As Stream
objStream = wrGETURL.GetRes ponse.GetRespon seStream()

Dim objReader As New StreamReader(ob jStream)
Dim strLine As String = ""
Dim intI As Integer = 0

Do While Not strLine Is Nothing
intI += 1
strLine = objReader.ReadL ine
If Not strLine Is Nothing Then
Console.WriteLi ne("{0}:{1}", intI, strLine)
End If
Loop
Nov 21 '05 #1
0 936

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

Similar topics

8
775
by: Carel Lotz | last post by:
H We have ported our VB 6 application into VB .NET but are still integrating with a few COM + applications written in VB6 running on our application server (Win 2000 Server). We have the proxies to link to the application server installed but we every now and then get a error when we try to make a call to a component running on the app server....
1
1681
by: Tony | last post by:
Hi, I have a VB program which will access (using CallByName function) the JavaScript in a page using IE6. It works fine if no proxy is set in IE6 (Tools -> Internet Options -> Connections -> LAN Settings). If the proxy is set, an exception will be thrown when the same VB program is run. The error message is -2147024891 Access is denied. ...
8
5460
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I...
1
1458
by: Quentin Huo | last post by:
Hi: I tried to send email from an ASP.NET page through SMTP. But I always got the error: Server Error in '/' Application. ---------------------------------------------------------------------------- ----
0
1410
by: Steve Podradchik | last post by:
Hi, In reading the docs for how to do NTLM authentication w/ .Net, an interesting problem seems to appear. Specifically, how do you set the username/password info for a 3rd party Web server that uses Basic authenticaiton AND, at the same time, go thru NT authentication. The pseudo-code is below: 'Does a basic Get request via NTLM
7
6994
by: George Jordanov Ivanov | last post by:
Folks, I have to design the WSDL files of a bunch of XML Web Services. But, unfortunately, I am not very keen on writing the WSDL file line by line, and moreover be aware of the whole standard specification in details. I will be very happy if there is a visual tool, which can do this for me. Does anyone know such kind of tool (if it is...
1
6815
by: robert | last post by:
In a DAV scheme with PROPFIND or GET (PROPFIND /test/ HTTP/1.1) and Basic AUTH to a MS SharePoint over https server (AUTH required), he responds 'WWW-Authenticate: NTLM' only: reply: 'HTTP/1.1 401 Unauthorized\r\n' header: Content-Length: 1656 header: Content-Type: text/html header: Server: Microsoft-IIS/6.0 header: WWW-Authenticate:...
3
6701
by: Peter van der veen | last post by:
Hi In my porject i use a custom header to be added to the SOAP message. I added the the custom SOAP header to the follwoing function which is in the proxy class. But when invoking the proxy for the first time i got the message Method XX cannot be reflected, where XX is the name of this function. When i remove the soapheader attribute...
1
8009
by: Proogeren | last post by:
I have a problem with a httpwebrequest that I am creating. The request in itself looks correct but using fiddler I see that a www-authentication header is sent along as well. The code is pasted below. I do not add any www-authentication header here so I was wondering if anyone knows how to remove it. I have used almost 2 days trying to figure...
0
8184
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8328
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7936
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...
0
8195
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5701
isladogs
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...
0
5375
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...
0
3820
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...
0
3845
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1158
bsmnconsultancy
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...

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.