Pages

Search This Blog

Monday, November 14, 2011

Bypassing authentication prompt when opening documents existing in sharepoint document libraries

By default, whenever we open a document uploaded in sharepoint document library,it tries to open it in the corresponding office application like Microsoft word/excel.

The office program like MS Word offers a seperate webDAV request which asks for authentication again.This can be annoying in some cases, especially in public facing anonymous sites.



Many a times, it is acceptable that the authetication prompt while opening documents be turned off.

This can be accomplished by doing the following:
IIS 6 : If the Sharepoint web application (having anonymous access) is hosted on IIS 6, then follow these steps:
        1.Go to Central admin,Click 'Application Management'->Click 'Authentication Providers' and choose the zone extended for anonymous access.
        2.Set Enable Client Integration to 'No'.  
        3.Open the web.config for that web application in the folder C:\Inetpub\wwwroot\wss\VirtualDirectories\<port_number>
        4.Find the 'httpHandlers' section.
        5. In the following 'httpHandler' entry, remove the verb 'OPTIONS' i.e.:
          Old value:  <add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

          Change to: <add verb="PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
       6. Save web.config.

IIS 7 : If the Sharepoint web application (having anonymous access) is hosted on IIS 7, then follow these steps:
        1.Go to Central admin,Click 'Application Management'->Click 'Authentication Providers' and choose the zone extended for anonymous access.
        2.Set Enable Client Integration to 'No'.  
        3.click on the sharepoint web application having anonymous access.       
        4.Double click on 'Request Filtering'.
        
       

        5.Go to 'Http Verbs' section and create 2 deny headers for 'OPTIONS' and 'PROPFIND'.
       
        
  





        6.Do IISRESET.

No , whenever the document is opened from a document library for this web application, it will open without any authentication prompt.

No comments:

Post a Comment