Re: 401 Unauthorized trying to read SPList Attachment - owssrv.dll

From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 04/26/05


Date: Mon, 25 Apr 2005 23:57:03 -0700

IIS does not see your impersonated user because you failed to authenticate
as that user.

Remember that we are talking about HTTP, which has its own publicly defined
authentication protocols. Client-side impersonation isn't one of them. The
identity of the user on the client, impersonated or not, means ABSOLUTELY
NOTHING on the server unless you negotiate HTTP authentication of some sort.

IE, for example, does this authentication behind the scenes without you
noticing. So do many of the Windows programs and protocols. This isn't how
the web and HTTP works, though, and you just have to follow the rules.

-- 
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Chris Kane" <ChrisKane@discussions.microsoft.com> wrote in message
news:3DA9A3DB-FD45-436E-99B5-265B002F81B3@microsoft.com...
We have written a class that enumerates the items in a WSS list and then
attemptes to open the attachment for each item.  We have written two
classes,
one to impersonate a user and read in the list information and the other to
be called by the first which actually opens the attachment.  Our code fails
when it tries to open the attachment in the second class with a 401 -
Unauthorized error from IIS on http://localhost/_vti_bin/owssrv.dll.  What's
strange is that I can use IE to open the URL to the attachemnt without any
problems.  I noticed in the IIS logs that when I open the URL, I can see the
domain\password passed to IIS from IE.  However, when our code tries to
access the same URL, no user information is passed, causing the 401.  We
have
impersonated a valid user in our code, so why does IIS not see it?
Thanks!


Relevant Pages

  • Re: impersonating a user
    ... > authentication is what determines the context of the thread. ... > applications, IIS will read the HTTP, and when anonymous is selected IIS ... > Local System account (which is the default account for Services that are ... > impersonation and authentication very clearly. ...
    (microsoft.public.inetserver.iis.security)
  • Re: IIS Folder and file security. Impersonation does not work.
    ... Custom URL navigation. ... First -- what you want to do does NOT need the impersonation DLL at all. ... Second -- you are muddling HTML and IIS concepts together and hoping for the ... Now, with IIS6, we have a custom authentication sample ISAPI that should ...
    (microsoft.public.inetserver.iis)
  • Re: IIS impersonation problems
    ... Are you using Basic or Integrated Windows Authentication? ... then IIS never has the user's password - so it can't ... permissions to logon to remote resources. ... Is there a maximum number of hops impersonation can make? ...
    (microsoft.public.inetserver.iis.security)
  • Re: custom page for user credentials?
    ... custom HTML page to enter username/password, transmit it in some fashion, ... and do the verification on IIS. ... you MUST give at least one impersonation ... the equivalent of Windows Integrated Authentication everywhere. ...
    (microsoft.public.inetserver.iis.security)
  • Re: HELP!!! IIS wont display a Powerpoint presentation when Basic Authentication is enabled
    ... does the PPT download properly? ... IIS is not responsible for displaying any Powerpoint ... After authentication and authorization takes place, ... and then opens it. ...
    (microsoft.public.inetserver.iis)