401 Unauthorized trying to read SPList Attachment - owssrv.dll

From: Chris Kane (ChrisKane_at_discussions.microsoft.com)
Date: 04/25/05


Date: Mon, 25 Apr 2005 08:51:02 -0700

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: 401 Unauthorized trying to read SPList Attachment - owssrv.dll
    ... > received the 401 from IIS. ... I can see how we could retrieve the attachemnt ... >> 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. ...
    (microsoft.public.inetserver.iis.security)
  • Re: Visual Studio .NET IDE and IIS
    ... do you have a virtual path mapped to this directory in IIS. ... > Once I click on "Try to open the page with frontpage server extensions", ... > new project opens fine. ...
    (microsoft.public.dotnet.framework)
  • Re: cant open live
    ... I did go to control panel/admin tools/ and then clicked on IIS icon - ... which opens the IIS box, ... Default Web Site ... > In FP 2003 the local site is the one you currently have open in FP, and the remote site is the one you are trying to publish to> - so if you open your online site on the web and look at the Remote Web Site: ...
    (microsoft.public.frontpage.client)
  • RE: Web Server running ASP.NET 1.0
    ... Each site/application within IIS can have it's own .NET runtime settings. ... Click on the "configuration button". ... This opens the configuration ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: WebDav and Excel doesnt work
    ... WebDAV and Authentication built into IIS should easily solve this problem ... Ricardo Almeida "David Wang " wrote:> If you are trying to make the ASPX page secure access to the .DOC and .XLS> files, then simply put the .DOC and .XLS files OUTSIDE of the website so> that they are completely inaccessible via a URL, and then write the ASPX> page to open and stream those file content > to the browser. ... > The fact that directory browsing affects behavior suggests that you have at> least some coding errors in your ASPX page that relies on URL-based access> to obtain the content> ... opens the file> and return it to the client... ...
    (microsoft.public.inetserver.iis)