Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 26 Aug 2008 04:51:01 -0700,    group: microsoft.public.dotnet.framework.aspnet        back       


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.CredentialCache.DefaultCredentials property. With this I am 
getting unauthorized 403 error.

If I explictly specify the credentials(using 
NetworkCredential(uid,pwd,domain)) 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
date: Tue, 26 Aug 2008 04:51:01 -0700   author:   AtulSureka

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us