Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

BUG: Internet Publishing Provider: Access Denied Error Occurs When You Download a Read-Only File


View products that this article applies to.

This article was previously published under Q252986

↑ Back to the top


Symptoms

When you are using the Microsoft OLE DB Provider for Internet Publishing (Internet Publishing Provider [IPP]) to get a pointer to a read-only file on the server, you may receive either an "Enter Network Password" dialog box or a "Permission Denied" error message. If your Windows NT challenge/response (NTLM) account has sufficient privileges, you may not get either of these error messages, but the read-only attribute of the file on the server will be reset.

Note that this happens even when you call IBindResource::Bind() to obtain a read-only IStream object with one of the following flags:
DBBINDURLFLAG_READ | DBBINDURLFLAG_SHARE_DENY_WRITE
DBBINDURLFLAG_READ | DBBINDURLFLAG_SHARE_DENY_READ
				

↑ Back to the top


Cause

When IPP obtains a "deny-shared" or "deny-read" pointer to an IStream object of a read-only file located on a server, IPP issues a write-lock through the use of Microsoft FrontPage Server Extensions RPC calls. A write-lock issued to FrontPage Server Extensions resets the read-only attribute of the file.

↑ Back to the top


Resolution

To resolve this problem, you can use the DBBINDURLFLAG_READ | DBBINDURLFLAG_SHARE_DENY_NONE flags to obtain an IStream pointer to a read-only file. Note that although this method will work, under certain circumstances (such as when someone tries to modify this file while a client is downloading it) the file can become corrupted.

↑ Back to the top


Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

Steps to Reproduce Behavior

  1. Make sure that you have MDAC 2.5 installed on your client computer.
  2. Copy and compile the Sample1 application from MSDN. This is located in the MSDN Library at the following location:
    Platform SDK
     Web Services
       Microsoft OLE DB Provider for Internet Publishing
         Sample Programs
    					
  3. Use the following command line to download a file through the use of that compiled application:
    WebDAVTest download u=http://myserver/mydir/myfile.txt

    where http://myserver/mydir/myfile.txt is the URL of the file to download.
    This sample obtains an IStream object through the use of DBBINDURLFLAG_READ | DBBINDURLFLAG_SHARE_DENY_WRITE flags from the server. It then downloads the file from the internet or intranet site to your local hard drive. If the read-only attribute of the file is set, you should see the "Permission Denied" error message.

↑ Back to the top


Keywords: KB252986, kbpending, kbmdacnosweep, kbdatabase, kbbug

↑ Back to the top

Article Info
Article ID : 252986
Revision : 2
Created on : 8/24/2001
Published on : 8/24/2001
Exists online : False
Views : 266