我有一个沙盒解决方案,是从VS2010创建的。这个沙盒实际上是为SharePoint 2010创建的。在Office 365中,这个沙盒解决方案也能够顺利工作(即SharePoint 2013在线)。激活它后,会添加一个库并在该库内添加一个Web部件页面。但当我试图在SharePoint 2013服务器(本地安装在我们的服务器机器上的版本)中激活相同的沙盒解决方案时,从FUSLOGVW中看到以下错误:
*** Assembly Binder Log Entry (6/16/2013 @ 2:55:20 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\usercode\SPUCWorkerProcess.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = ELV1\spadmin
LOG: DisplayName = SolTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fd92f09fdeeefafe
(Fully-specified)
LOG: Appbase = file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = Sandboxed Code Execution Partially Trusted AppDomain
Calling assembly : Microsoft.SharePoint, Version=15.900.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c.
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\usercode\SPUCWorkerProcess.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
WRN: Application configuration file safe mode disallowed.
LOG: Post-policy reference: SolTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fd92f09fdeeefafe
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/SolTest.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/SolTest/SolTest.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/assemblies/SolTest.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/assemblies/SolTest/SolTest.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/SolTest.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/SolTest/SolTest.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/assemblies/SolTest.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/15/usercode/assemblies/SolTest/SolTest.EXE.
LOG: All probing URLs attempted and failed.
..
>UserAgent not available, file operations may not be optimized. at .....dd(Int32 >solutionGalleryItemId) at Microsoft.SharePoint.WebControls.SolutionItemButton.ActivateItem() ...
>Solution Deployment : Looking for 'ReceiverAssembly' attribute in manifest root node for solution >'Company Office 365 Sandbox Package.wsp'.
>Solution Deployment : Looking for 'ReceiverClass' attribute in manifest root node for solution 'Company Office 365 Sandbox Package.wsp'
Solution Deployment Missing one or more of the following attributes from the root node in solution Company Office 365 Sandbox Package.wsp: assembly , type.
功能安装: 将“SolTest_Company Office 365 Sandbox Feature”(ID:“44613a8d-0406-4dea-ac63-09db6aba469a”)功能安装到农场中。
无法为特性“SolTest_Company Office 365 Sandbox Feature”(ID:44613a8d-0406-4dea-ac63-09db6aba469a)加载接收器程序集“SolTest,Version=1.0.0.0,Culture=neutral,PublicKeyToken=fd92f09fdeeefafe”:System.IO.FileNotFoundException:找不到文件。
............
............
我想知道为什么沙箱解决方案在SharePoint 2013的云版本中可行,而在本地版本中不可行。有人可以阐明一下吗?我已经尝试使用浏览器激活沙箱解决方案,但没有尝试使用PowerShell。这样做会有什么区别吗?
Thanks,
Prakash