A place to share what I learn with everyone!
Todd BaginskiTodd Baginski

The UserCodeToken is invalid

By Todd Baginski

Recently I was creating a Sandboxed Compatible Visual Web Part  to display an AJAX Bing Maps control.  When I added the Web Part to the page for first time to test it I received the following error.

Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: The UserCodeToken is invalid.

I was surprised when I saw no one had posted a solution to this issue on the Internet.  To make the error go away I simply reset the SharePoint 2010 User Code Host Service.

Related Posts

17-Time Microsoft MVP

Microsoft Most Valuable Professional

5-Time Microsoft Fast Track Recognized Solution Architect (FTRSA)

Microsoft FastTrack Recognized Solution Architect
© 2026 Todd Baginski's Blog. All Rights Reserved.