Re: Authentication from ASP.NET to NT4 IIS hangs then timesout

From: Dave Kolb (Dave.Kolb@sas.com)
Date: 06/21/02


From: "Dave Kolb" <Dave.Kolb@sas.com>
Date: Fri, 21 Jun 2002 13:45:28 -0400


I got what I think amounted to a HTTP GET to work by using the DownloadData
method whereas the UploadValues method with the POST verb just hung. Perhaps
an issue with the CGI program???

' Could not make this work to an NT4 IIS server

'client.Credentials = CredentialCache.DefaultCredentials ' get
"unauthorized" as does no credentials

'client.Credentials = New Net.NetworkCredential("sasdxk", "xxx", "carynt") '
hangs

'data.Add("_service", "nt-appdev8")

'data.Add("_program", "istest.empno_tbl.sas")

'resp = client.UploadValues("http://nampub.pc.sas.com/sww-bin/broker.exe/",
"POST", data) ' test

' But this works fine!

client.Credentials = New Net.NetworkCredential("sasdxk", "xxx", "carynt")

data.Add("_service", "nt-appdev8")

data.Add("_program", "istest.empno_tbl.sas")

client.QueryString = data

resp = client.DownloadData("http://nampub.pc.sas.com/sww-bin/broker.exe/")

"Dave Kolb" <Dave.Kolb@sas.com> wrote in message
news:uye9fLUGCHA.2596@tkmsftngp10...
>
> Also, does nayone know the HTTP method verb for an HTTP GET for the
> webclient.UploadValues method? Or all the legal verbs which do not seem to
> be documented in the .NET help? I could only find examples of "POST" and
it
> is a string rather than an enumeration! What were they thinking??? "GET"
and
> "HTTPGET" do not work and get complaints as invalid verbs.
>
>
> "Dave Kolb" <Dave.Kolb@sas.com> wrote in message
> news:#F8PnGUGCHA.2748@tkmsftngp13...
> >
> > I have tried everyway I can think of to get my local W2K machine based
> > ASP.NET application to authenticate to another one of our NT4 IIS
servers
> > and either fail immediately with an "unauthorized" exception if I give
it
> a
> > bad password (expected) or hang till I timeout if I give it a good
> password.
> > I can use this same technique to hit a Unix web server no problem. Any
> > ideas? The target NT4 IIS server allows basic and windows
authentication.
> If
> > I try the same thing with a URL GET type request from the browser it
works
> > fine. I get prompted for the userid, pw and domain. In fact it works
even
> if
> > I just hit enter without entering anything at the authentication prompt.
> >
> > Thanks,
> > Dave Kolb
> >
> > ' tried without a cache at first
> > 'client.Credentials = CredentialCache.DefaultCredentials ' gets
> > "unauthorized" as does no credentials
> > 'client.Credentials = New Net.NetworkCredential("uuu", "ppp", "xxx") '
> hangs
> > and gets timeout
> > 'resp =
> client.UploadValues("http://nampub.pc.sas.com/sww-bin/broker.exe/",
> > "POST", data)
> >
> > ' then tried with a cache to try to force basic authentication in case
> there
> > was some sort of deleagation problem between W2K and NT4
> > Dim myCache As New CredentialCache()
> > 'myCache.Add(New Uri("http://nampub.pc.sas.com/"), "Basic", New
> > NetworkCredential("uuu", "ppp")) ' hangs
> > 'myCache.Add(New Uri("http://nampub.pc.sas.com/"), "Basic", New
> > NetworkCredential("uuu", "ppp", "ddd")) ' hangs
> > 'myCache.Add(New Uri("http://nampub.pc.sas.com/"), "Ntlm", New
> > NetworkCredential("uuu", "ppp", "ddd")) ' hangs
> > client.Credentials = myCache
> >
> > ' then do a post
> > resp =
client.UploadValues("http://nampub.pc.sas.com/sww-bin/broker.exe/",
> > "POST", data)
> >
> >
>
>