Re: Please help Passing Credentials



Hi Joe,

Thanks for the tip, I am trying to wade through all the info on google
now!

I installed the tool from blunck.info and authentication seems o.k it
returns negotiate for all requests.
However I still get the 401 error when constructing the HttpWebRequest
(see code below)

What should I be looking for next?

Thanks in advance
Jerry


HttpWebRequest Req = (HttpWebRequest)
WebRequest.Create(http://server2/MyWebApp/ExternalXMLSubmit.asp);
Req.Credentials = System.Net.CredentialCache.DefaultCredentials;
Req.ContentType="text/xml;charset=UTF-8";
Req.Method="POST";
Req.ContentLength = byteArray.Length;
Stream newStream = Req.GetRequestStream();
newStream.Write(byteArray,0,byteArray.Length);
newStream.Close();

//GetResponse
HttpWebResponse response = (HttpWebResponse)Req.GetResponse();
StreamReader responseStream = new
StreamReader(response.GetResponseStream());
string Res = processResponse(responseStream.ReadToEnd());
return Res;

Joe Kaplan wrote:
Double hops are solved by implementing Kerberos delegation. I'd suggest
doing some reading on that. There are lots of good papers on the various MS
websites explaining it and I've answered the question in detail on this and
other newsgroups too. In fact, there is another thread that was just
started a few days ago that already launches into the details. Google is
your friend...

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"JOS" <JeremiahOSullivan@xxxxxxxxx> wrote in message
news:1164137895.231827.206100@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I am having problems passing Windows credentials to a HTTPRequest
object using ASP.NET 1.1

Here is my set up
Server 1
* ASP.NET 1.1 application
* Integrated Authentication Security
* <identity impersonate = true>
Server 2
* ASP Page
* Integrated Autentication Security

I am creating a HTTPRequest object in Server 1 and passing credentials
using System.NET.DefaultCredentials. The HTTPRequest object is calling
an ASP page on server 2 to submit some XML

If I log on to Server1 as a windows user, browse to the web application
and submit the page it works ok

If I log on to Server 2 as the same windows user, browse to the web
application on Server 1 and submit the page I get a 401 access denied
error

It looks like I am have problems with the double hop of the
credentials.

How can I get this to work, I have basic knowledge of Windows
networking so the simpler the better:)

Any help gratefully recevied


.



Relevant Pages

  • Re: NTLM authentication
    ... LDAP server on the DC. ... Well, it depends on so many things, like the OS versions, Domain versions client types and the final purpose of the authentication act. ... call Win32 LogonUser, but while this validate a Windows user, it's purpose is to return an access token. ... It's funny that people never authenticate against, let's say against a SQL server, but find is quite usual to do it against a Directory server. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: NTLM authentication
    ... authenticate a windows user is bad practice, ... authentication purposes. ... more processing overhead ... server, but find is quite usual to do it against a Directory server. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Kerberos machine authentication - apparent authentication fail
    ... > until logon), the wireless connection can kick off when it is ready. ... > was confirmed in the server event logs with IAS (i set that up as the radius ... > as an ordinary user kicks in and takes over from the machine authentication. ... > while the network sorts itself out and a double click on a network link of ...
    (microsoft.public.windows.server.security)
  • Re: Basic Authentication + IIS 5 + Windows 2000 + Frontpage 2002 = failure?
    ... SYSTEM account. ... In IIS I took the virtual server that I was testing, ... Authentication premise. ... From a website perspective, I ...
    (microsoft.public.inetserver.iis.security)
  • Need help configuring Wireless Connection profile
    ... I have an SBS 2003 server and a Server 2003 member server set up using RADIUS ... Windows authentication for all users,4129,LRG\ryanv,4149,Wireless WPA2 PEAP ... Certificate Services ...
    (microsoft.public.windowsxp.general)