【发布时间】:2011-01-09 03:50:08
【问题描述】:
我正在尝试使用 Sharepoint 2007 中的 AddWebPartToZone Web 服务调用以编程方式将 Web 部件添加到 Web 部件页面。我们得到一个肥皂异常 (Microsoft.Sharepoint.SoapServer.SoapServerException)。
我要添加的 webpart 是在 codeplex 上找到的 Chatterbox 应用程序的原始版本。当我尝试将内容编辑器 webpart 添加到同一页面时,它可以完美运行。
我们可以手动将 webpart (Chatterbox) 添加到 webpart 页面,它工作正常。我们已经检查并且 web 部件被适当地添加到 webconfig 中的安全控件列表中(应该是这样)。所以下一步是快速查看日志。我们得到的消息是:
Monitorable Usage: Security - Web Services: AddWebPart
Monitorable Error importing WebPart. Assembly Microsoft.SharePoint.SampleParts.ChatterBox, Version=12.0.0.0, Culture=neutral, PublicKeyToken=48e046c834625a88, TypeName. Microsoft.SharePoint.SampleParts.ChatterBox
我尝试修改我们在 web 服务调用中使用的 webpart XML,但每次都会收到相同的错误消息。现在这看起来像是 web 部件的权限问题,但看到我们已将其正确添加到 webconfig 中的安全控件列表中,我看不出我还能做什么?
这是我们使用的 webpart XML:
<?xml version="1.0" encoding="utf-16"?>
<WebPart xmlns:xsd="http://schemas.microsoft.com/WebPart/v3" xmlns:xsi="http://microsoft.com/sharepoint/webpartpages" xmlns="http://schemas.microsoft.com/WebPart/v2">
<IsIncluded>true</IsIncluded>
<ZoneID>Full Page</ZoneID>
<PartOrder>1</PartOrder>
<FrameState>Normal</FrameState>
<Height />
<Width />
<AllowClose>True</AllowClose>
<AllowRemove>true</AllowRemove>
<AllowZoneChange>true</AllowZoneChange>
<AllowMinimize>false</AllowMinimize>
<IsVisible>true</IsVisible>
<NumComments>10</NumComments>
<UpdateInterval>5</UpdateInterval>
<AllowConnect>True</AllowConnect>
<ChromeType>Default</ChromeType>
<TitleIconImageUrl />
<Description />
<Hidden>False</Hidden>
<BackingListName>Potato</BackingListName>
<UserName />
<AllowEdit>True</AllowEdit>
<DetailLink />
<HelpLink />
<Title>ChatterBox 101</Title>
<Dir>Default</Dir>
<PartImageSmall />
<MissingAssembly />
<PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>
<IsIncludedFilter />
<Assembly>ChatterBox, Version=12.0.0.0, Culture=neutral, PublicKeyToken=48e046c834625a88</Assembly>
<TypeName>Microsoft.SharePoint.SampleParts.ChatterBox</TypeName>
<ChromeState>Normal</ChromeState>
<HelpMode>Navigate</HelpMode>
</WebPart>
我们有一个在 Win 2003 上运行的 sharepoint 2007 (MOSS) 盒子。任何帮助都将不胜感激,因为这正在缓慢但肯定会引起我的注意!
谢谢,
凯夫
【问题讨论】:
标签: sharepoint-2007 service web-parts