sharepoint 2010:沙盒 Web 部件错误
我只是想在 Visual Studio 2010 中创建一个简单的 Web 部件(适用于 Sharepoint 2010) 我创建了一个空的共享点项目,然后添加了一个 Web 部件。我写了一个简单的代码(从一本带有示例的书中粘贴它) 我构建项目,然后部署它(没有错误)
然后,当我转到要添加 Web 部件的网页时,在添加它时收到此错误:
“沙盒代码包装器抛出了未处理的异常” 部分信任应用域中的执行方法: $Resource:core,ImportErrorMessage;"
有什么想法吗? 如果需要,我会发布 .cs 文件的代码
谢谢
I was just tryng to create a simple webpart in visual studio 2010 (for sharepoint 2010)
I created an empty sharepoint project, then added a webpart. I wrote a simple code (pasting it from a book with examples)
I Build the project, then deploy it (without errors)
Then when i go to the webpage where i want to add my webpart, i get this error when adding it:
"unhandled exception was thrown by the sandboxed code wrapper's
Execute method in the partial trust app domain:
$Resource:core,ImportErrorMessage;"
Any idea about it?
If it's needed i'll post the code of the .cs file
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道为什么,但第二次尝试成功了
我不能确切地说出第一次出了什么问题,但现在我再也没有遇到过同样的问题
i don't know why but the second try worked
i can't say exactly what went wrong the first time, but i never get the same problem now
我已经弄清楚了,它与随项目一起生成的清单和功能 xml 文件有关。
当你开始时,你应该有一个像这样的名称空间。
但由于某种原因,在这些 xml 文件中,它被添加为
“带有额外的”。” (点)。
修复打开像记事本++这样的东西,在项目中进行搜索,首先查找
它们应该在清单/功能文件中。更改为单个点,因此应该执行类似
“下一步”搜索单个点的操作。安全列表中应该有一个,删除单个点。再次尝试部署 - 应该没问题。
I've figured this one out, its something to do with the manifest and features xml files that are generated along with the project.
When you start you should have a namespace like this.
But for some reason in those xml files it's added as
With an extra '.' (dot).
The fix open something like notepad++ do a search through the project and at first look for
They should be in the manifest/features files. Change to a single dot so should have something like
Next do a search for a single dot. There should be one in the safe list, remove the single dot. Try the deployment again - should be ok.