Home All Groups Group Topic Archive Search About

Why defaultcredential doesn't use the impersonated user?

Author
29 Jul 2005 5:09 AM
David Zhu
Hi,

When I trying to pass System.Net.CredentialCache.DefaultCredentials to a web
service object, such as:

ReportingService rs = new ReportingService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = sWebServiceURL;

It would always uses the anonymous user from IIS, although I specified the
identity
impersonate to be true, and include a perticular domain user I want to use.

So, in fact, it acts as a different way to some web service security
document said.

Who knows?

Author
29 Jul 2005 3:25 PM
Joe Kaplan (MVP - ADSI)
What is the value of WindowsIdentity.GetCurrent().Name when you make this
call?  It is those credentials that should be used.

Joe K.

Show quoteHide quote
"David Zhu" <David***@discussions.microsoft.com> wrote in message
news:E67564C1-8A80-4D87-9EFE-169F221606EC@microsoft.com...
> Hi,
>
> When I trying to pass System.Net.CredentialCache.DefaultCredentials to a
> web
> service object, such as:
>
> ReportingService rs = new ReportingService();
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
> rs.Url = sWebServiceURL;
>
> It would always uses the anonymous user from IIS, although I specified the
> identity
> impersonate to be true, and include a perticular domain user I want to
> use.
>
> So, in fact, it acts as a different way to some web service security
> document said.
>
> Who knows?
>
Author
1 Aug 2005 8:29 AM
David Zhu
Hi,

WindowsIdentity.GetCurrent().Name is the impersonated user I specified.
But, defaultcredential uses the anonymous user of current web application,
That's why I'm confused.

Show quoteHide quote
"Joe Kaplan (MVP - ADSI)" wrote:

> What is the value of WindowsIdentity.GetCurrent().Name when you make this
> call?  It is those credentials that should be used.
>
> Joe K.
>
> "David Zhu" <David***@discussions.microsoft.com> wrote in message
> news:E67564C1-8A80-4D87-9EFE-169F221606EC@microsoft.com...
> > Hi,
> >
> > When I trying to pass System.Net.CredentialCache.DefaultCredentials to a
> > web
> > service object, such as:
> >
> > ReportingService rs = new ReportingService();
> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
> > rs.Url = sWebServiceURL;
> >
> > It would always uses the anonymous user from IIS, although I specified the
> > identity
> > impersonate to be true, and include a perticular domain user I want to
> > use.
> >
> > So, in fact, it acts as a different way to some web service security
> > document said.
> >
> > Who knows?
> >
>
>
>
Author
1 Aug 2005 2:03 PM
Joe Kaplan (MVP - ADSI)
Ah, are you saying the credentials on the remote machine are the anonymous
user?  How is it that you know what user is being used on the reporting
services box?  The result with WindowsIdentity.GetCurrent sounds correct.

This sounds exactly like a standard double-hop problem that must be solved
with Kerberos delegation.

Joe K.

Show quoteHide quote
"David Zhu" <David***@discussions.microsoft.com> wrote in message
news:9CEA0F7F-6C7F-4853-84A2-1E26C610C2C8@microsoft.com...
> Hi,
>
> WindowsIdentity.GetCurrent().Name is the impersonated user I specified.
> But, defaultcredential uses the anonymous user of current web application,
> That's why I'm confused.
>
Author
30 Jul 2005 12:20 PM
Yunus Emre ALPÖZEN [MCSD.NET]
Try to remove anonymous access from inetmgr. And choose Integrated Windows
Authentication... It should work

--
HTH

Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET

Show quoteHide quote
"David Zhu" <David***@discussions.microsoft.com> wrote in message
news:E67564C1-8A80-4D87-9EFE-169F221606EC@microsoft.com...
> Hi,
>
> When I trying to pass System.Net.CredentialCache.DefaultCredentials to a
> web
> service object, such as:
>
> ReportingService rs = new ReportingService();
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
> rs.Url = sWebServiceURL;
>
> It would always uses the anonymous user from IIS, although I specified the
> identity
> impersonate to be true, and include a perticular domain user I want to
> use.
>
> So, in fact, it acts as a different way to some web service security
> document said.
>
> Who knows?
>
Author
1 Aug 2005 8:38 AM
David Zhu
I have a web application which calls the web service on a reporting service
site on the same machine.

so, my web application site should allow anonymous accessing, and my
reporting service site doesn't allow anonymous accessing, and allow
Integrated windows
authentication.

So, I hope the impersonate user of the web application could be used by web
service crendential.



Show quoteHide quote
"Yunus Emre ALPÖZEN [MCSD.NET]" wrote:

> Try to remove anonymous access from inetmgr. And choose Integrated Windows
> Authentication... It should work
>
> --
> HTH
>
> Thanks,
> Yunus Emre ALPÖZEN
> BSc, MCSD.NET
>
> "David Zhu" <David***@discussions.microsoft.com> wrote in message
> news:E67564C1-8A80-4D87-9EFE-169F221606EC@microsoft.com...
> > Hi,
> >
> > When I trying to pass System.Net.CredentialCache.DefaultCredentials to a
> > web
> > service object, such as:
> >
> > ReportingService rs = new ReportingService();
> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
> > rs.Url = sWebServiceURL;
> >
> > It would always uses the anonymous user from IIS, although I specified the
> > identity
> > impersonate to be true, and include a perticular domain user I want to
> > use.
> >
> > So, in fact, it acts as a different way to some web service security
> > document said.
> >
> > Who knows?
> >
>
>
>