2011-11-30 79 views
0

我有一个SharePoint 2010沙箱解决方案可以在我的开发机器上完美地工作,如果我将该页面视为:http://dev/page.aspx它很好用。SharePoint沙盒解决方案基于使用的Web地址失败

但是,如果我查看页面http://dev.corp.company.com/page.aspx我收到以下错误:没有代码查看空白Web部件落后时

Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: File Not Found. 

错误抛出均匀。

[assembly: AllowPartiallyTrustedCallers()] 

存在。

+1

如何捕捉异常,记录和检查的问题?然后,如果您无法解决问题并发布异常和代码。 –

+0

我试着在代码中添加断点,但从不开火。你建议看看日志文件,还是有更简单的方法? @OndrejTucny – Wesley

+1

检查日志文件以防万一您无法在IDE中捕获异常,这是一个明显的步骤。调试并不容易... –

回答

1

它看起来像我需要配置备用访问映射:

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

Alternate access mappings have not been configured. Users or services are accessing the site http://dev with the URL http://dev.corp.company.com . This may cause incorrect links to be stored or returned to users. If this is expected, add the URL http://dev.corp.company.com as an AAM response URL. For more information, see: http://go.microsoft.com/fwlink/?LinkId=114854 "

ALSO:

The Web application at http://skynet.redmond.corp.microsoft.com/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application. at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken) at Microsoft.SharePoint.SPSite..ctor(String requestUrl) at Microsoft.SharePoint.SPSite_SubsetProxy.SPSite__Factory(String requestUrl)

相关问题