473,385 Members | 1,782 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.

Authenticate thru a MS proxy/NTLM

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

Try
wr = CType(WebRequest.Create(URL), HttpWebRequest)

wr.Credentials = New NetworkCredential (NetworkUserName,
NetworkPassword, NetworkDomain)

Resp = CType(wr.GetResponse(), HttpWebResponse)

Catch ex as WebException

' Not shown .. code to detect when we need to a simple WWW-Authenticate

if WWWAuthenticateRequested then

'Do the same thing but, this time, add the UserName/Password
required by the external Web site (plain text authentication)

wr = CType(WebRequest.Create(URL), HttpWebRequest)

wr.Credentials = New NetworkCredential(ExternalSiteUserName,
ExternalSitePassword)

Resp = CType(wr.GetResponse(), HttpWebResponse)

end if

End Try

We can't test this at our site but it would appear that setting the
credentials correctly for the external Web site would invalidate the
credentials we need to authenticate on the internal NTLM system. What's the
correct way to get around this?

Thanks, Steve

Then, wh
Nov 20 '05 #1
0 1359

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

Similar topics

5
by: yoda | last post by:
I've recently configured my network such that I use squid as a http proxy. I'd now like to be able to use setuptools and ez_setup via this proxy. Is this possible? If so, how do I do it? The...
5
by: John | last post by:
Hi Does anyone have an example of using the Internet Transfer Control from behind a proxy server on port 8080? Thanks Regards
3
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...
0
by: B111Gates | last post by:
OK I know this is a complex question so I will break it up. I know that SSPI is the prefered method of authentication, however if I use the sample provide by MS I cannot authenticate across...
0
by: Punit | last post by:
Hello, I have an unmanaged VC7 app (ActiveX control implemented using MFC) calling a C# dotnet service. I'm using the VS2003 generated proxy class derived from CSoapSocketClientT. The activeX...
4
by: looping | last post by:
Hi, I have to make internet connections through an ISA proxy server that use NTLM or Kerberos authorization method. I've found a program in python called ntlmaps that act like a proxy and could...
2
by: Haxan | last post by:
Hi, I have an unmanaged C++ dll that consumes a web service using NTLM proxy authentication. I was able to consume the web service and get the results when using .Net runtime 1.1. When I...
1
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...
2
by: =?Utf-8?B?TGVuc3Rlcg==?= | last post by:
A C# (.NET 2) application which uses the System.Net.HttpWebRequest object to request a resource over HTTPS is failing following the installation of a new proxy server on our internal network with...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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:
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,...

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.