2011-11-30 93 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)

相關問題