Using Default Credentails with HttpWebRequest

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QXR1bFN1cmVrYQ==?=

    Using Default Credentails with HttpWebRequest

    Hi

    I have a two virtual directories(say VD 1 & VD2) hosted on same web server.
    Both are configured to use Windows NT authentication.

    I hosted some web pages to VD1 and there is web service running on VD2.

    I want to consume the web services (VD2) from the web pages (VD1). For that
    I am using HttpWebRequest object.

    I want to use default credential to consume the web services. For that I am
    using System.Net.Cred entialCache.Def aultCredentials property. With this I am
    getting unauthorized 403 error.

    If I explictly specify the credentials(usi ng
    NetworkCredenti al(uid,pwd,doma in)) then it works.

    Also in the browser if I first open VD1 page & then copy & paste the web
    service URL then also it works. This means that browser is able to use the
    same credentials to open VD2 web service.

    Can anybody tell me how to use the credentials of VD1 to access web services
    (VD2).

    Atul Sureka

Working...