在IE中打开SharePoint文档库中的Office文档, 文档没有打开却打开了个表单认证的登录页面

正常的情形

===========

在符合下面条件的正常情况下:

  1. SharePoint站点使用表单认证.
  2. 不使用Persistent Cookie.
  3. 在SharePoint站点里点击链接打开Office文档.

Office会弹框, 框内是一个表单登录页面, 要求你输入用户名和密码. 正常的界面如下:

image

 

问题描述

=============

现在问题来了, 在一个环境中, Office没有弹框要求我输入用户名和密码, 在Office主窗体里直接渲染了登录页面.

并且在其中输入用户名和密码后点击按钮登录无效. 如图:

image

 

解决方案

=============

这个问题微软已经在KB932118中进行了描述. 解决方案是把这个站点加入到Trusted Zone.

 

原因解释

=============

其实这并不是一个SharePoint的问题, 而是一个IE问题. IE7, 8当中添加了一项叫做Protected Mode的新功能. IE会将不同的站点放入不同的security zone中, 默认情况下在Internet, Intranet, Restricted三个zone里都开启了Protected Mode, 而只有Trusted Zone是关闭的. 开启了这项功能的zone里的站点的cache和persistent cookie都会被隔离起来. 隔离之后, 这些站点就不能够写入文件到可以开放给安全等级比IE7低的应用程序使用的文件夹中. 即, 开启了protected mode的zone里的站点的cache和persistent cookie对其他程序都是不可见的.

 

出问题的SharePoint站点里的authentication provider开启了persistent cookie, 并且该站点还不在trusted zone里. 所以Office想找到这样的persistent cookie却找不到. Office又想自己认证, 可是站点那边实现的authentication provider却说已经给了你persistent cookie了,于是Office只好把认证页面给打开了. 注意, 这里的打开仅是渲染一下而已, 背后的登录机制却不能工作. 这就解释了为什么Office打开了页面, 即使输入用户名和密码也不能打开文档了.

 

参考资料:

===========

Plan authentication settings for Web applications (Windows SharePoint Services)

http://technet.microsoft.com/en-us/library/cc288081(office.12).aspx

Forms Authentication in SharePoint Products and Technologies (Part 3): Forms Authentication vs. Windows Authentication

http://msdn.microsoft.com/en-us/library/bb977430.aspx

Persistent cookies are not shared between Internet Explorer 7 and Office applications in Windows Vista

http://support.microsoft.com/kb/932118 

Persistent cookies和Session cookies的定义与区别

http://www.cnblogs.com/awpatp/archive/2010/10/24/1859756.html

posted on 2010-10-24 15:51  中道学友  阅读(1581)  评论(0编辑  收藏  举报

导航

技术追求准确,态度积极向上