0

I have a SharePoint 2010 Sandbox Solution working perfectly on my dev machine if I view the page as: http://dev/page.aspx it works great.

However, if I view the page as http://dev.corp.company.com/page.aspx I get the following error:

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

Error throws even when viewing a blank web part with no code behind.

[assembly: AllowPartiallyTrustedCallers()] 

is present.

Wesley
  • 5,381
  • 9
  • 42
  • 65
  • 1
    How about catching the exception, logging and inspecting the problem? Then if you fail to figure out the problem post both the exception and your code. – Ondrej Tucny Nov 30 '11 at 22:43
  • I tried adding break points in the code, but the never fire. Are you suggesting looking at the log files, or is there an easier way? @OndrejTucny – Wesley Nov 30 '11 at 23:04
  • 1
    Inspecting the log file in case you can't catch the exception in the IDE is an obvious step. Debugging ain't gonna be easy… – Ondrej Tucny Nov 30 '11 at 23:11
  • 1
    If you want to debug the sandbox code you need to attach the debugger to SPUCWorkerProcess. – Nitin Rastogi Dec 01 '11 at 04:10

1 Answers1

1

It looks like I need to configure alternate access mappings:

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)

Wesley
  • 5,381
  • 9
  • 42
  • 65