Microsoft KB Archive/252986

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Article ID: 252986

Article Last Modified on 8/24/2001



APPLIES TO

  • Microsoft Data Access Components 2.5



This article was previously published under Q252986

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
                

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.

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.

STATUS

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

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.



Additional query words: fp msdaipp.dll msdaipp readonly

Keywords: kbbug kbdatabase kbmdacnosweep kbpending KB252986