Home All Groups Group Topic Archive Search About

Pls Help! Passing credential between two web sites on same machin

Author
6 May 2005 6:40 AM
FA
Hi,

On the same machine, I have created two web sites, the first site requires
client cert and is mapped to a windows account.  The second site is
restricted to be called by the first site by limiting the IP address to
localhost.  If I enable windows authentication for the second site, I will
get 401 (unauthorized).  Can anyone tell me how to pass the windows
credential of the first site when calling second site?

Thanks.

Author
6 May 2005 7:09 AM
Dominick Baier [DevelopMentor]
Hello FA,

How do you call the 2nd site??

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> Hi,
>
> On the same machine, I have created two web sites, the first site
> requires client cert and is mapped to a windows account.  The second
> site is restricted to be called by the first site by limiting the IP
> address to localhost.  If I enable windows authentication for the
> second site, I will get 401 (unauthorized).  Can anyone tell me how to
> pass the windows credential of the first site when calling second
> site?
>
> Thanks.
>
Author
6 May 2005 7:38 AM
FA
Http post

Show quoteHide quote
"Dominick Baier [DevelopMentor]" wrote:

> Hello FA,
>
> How do you call the 2nd site??
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
> > Hi,
> >
> > On the same machine, I have created two web sites, the first site
> > requires client cert and is mapped to a windows account.  The second
> > site is restricted to be called by the first site by limiting the IP
> > address to localhost.  If I enable windows authentication for the
> > second site, I will get 401 (unauthorized).  Can anyone tell me how to
> > pass the windows credential of the first site when calling second
> > site?
> >
> > Thanks.
> >
>
>
>
>
Author
6 May 2005 10:06 AM
Dominick Baier [DevelopMentor]
Hello FA,

so you are using the HttpWebRequest classes?

Requests are anonymous then - you have to attach credentials to the request
- this is why you get the 401.

Have a look at the Credential property of HttpWebRequest

CredentialCache.DefaultCredentials is for Windows integrated auth, like:

myHttpWebRequest.Credentials = CredentialCache.DefaultCredentials;

HTH

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> Http post
>
> "Dominick Baier [DevelopMentor]" wrote:
>
>> Hello FA,
>>
>> How do you call the 2nd site??
>>
>> ---------------------------------------
>> Dominick Baier - DevelopMentor
>> http://www.leastprivilege.com
>>> Hi,
>>>
>>> On the same machine, I have created two web sites, the first site
>>> requires client cert and is mapped to a windows account.  The second
>>> site is restricted to be called by the first site by limiting the IP
>>> address to localhost.  If I enable windows authentication for the
>>> second site, I will get 401 (unauthorized).  Can anyone tell me how
>>> to pass the windows credential of the first site when calling second
>>> site?
>>>
>>> Thanks.
>>>