.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Logging to SharePoint 2010 ULS log from sandbox

Posted By: svdoever     Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

You can't log directly from sandbox code to the SharePoint ULS log. Developing code without any form of logging is out of this time, so you need approaches for the two situations you can end up with when developing sandbox code:

You don't have control over the server (BPOS scenario):

  • You can log to comments in your HTML code, I know it's terrible, don't log sensitive information
  • Write entries to a SharePoint "log" list (also take care of some form of clean up, for example if list longer that 1000 items, remove oldest item when writing new log message)

You have control over the server:

View Complete Post

More Related Resource Links

SharePoint's Sandbox: Developing, Deploying and Monitoring Sandboxed Solutions in SharePoint 2010


The challenge in SharePoint development has always been the balance between creating and deploying solutions that you can trust not to damage or impair a SharePoint farm. A new feature in SharePoint 2010, called Sandboxed Solutions, enables farm administrators to feel comfortable that the SharePoint farm is safe, gives site collection administrators the authority to manage applications in their site collection, and provides developers with the flexibility to create solutions they know will be deployed in a safe and rapid manner.

Paul Stubbs

MSDN Magazine November 2009

Video: SharePoint 2010: Executing Code in the Sandbox

Find out how the Sandboxed Solutions Service provides for a complete isolation system that ensures code running in a sandboxed solution cannot reach out to access information beyond the scope of the deployment. (Length: 12:01)

Debugging and Logging Capabilities in SharePoint 2010

Learn about the new logging and debugging capabilities in SharePoint Foundation 2010 that enable developers to build more reliable and testable solutions.

Event receivers in SharePoint 2010 sandbox.



public class EventReceiver1 :

Short Overview of SharePoint Features in Visual Studio 2010

As you probably know, Visual Studio 2010 was announced earlier this week and it contains a lot of cool features and project templates for SharePoint developers. Below is a short overview for some of the SharePoint development related features and project templates.

How to get more information about the exceptions that can happen in SharePoint 2010 projects?

In case there is an exception anywhere in the SharePoint 2010 project (most common place an exception would happen is during deployment of your SharePoint project, custom deployment configuration or custom deployment steps), there's a registry key EnableDiagnostics available for you to use.

InfoPath 2010 cannot connect to SharePoint 2010

You have installed Office 2010 beta and you are trying to connect to SharePoint 2010 from InfoPath but you get an error

Installing and configuring SharePoint 2010

The following steps show how to install SharePoint 2010 on VMware workstation 7.0. Host computer used during the preparation of this walk-through was a Vista (32-bit) machine and guest machine used was VMware workstation 7.0 with Windows Server 2008 Service Pack 2 (64-bit).

Content Query Web Part missing in SharePoint 2010

If you don't see content query web part listed in the web parts list, this is because you have not enabled "Search Server Web Parts" feature in site collection features. Enable this feature and content query web part will show in the list of web parts.

Developing on SharePoint 2010 Intro Tutorial

Folks, this is a exciting news for SharePoint Geeks that the availability of Developing on SharePoint 2010 Tutorial can be access here.

Accessing SharePoint 2010 Data with Server-Side APIs

Accessing SharePoint data in server-side solutions is one of the most common tasks that you will perform as a SharePoint developer. SharePoint 2010 provides powerful server-side APIs that enable you to retrieve, add, edit, and delete SharePoint data programmatically. SharePoint 2010 also includes the new LINQ to SharePoint technology that enables you to work with SharePoint data efficiently and easily.

What Developers Need to Know About SharePoint 2010

Visual Studio 2010 integrates with SharePoint much more closely than in previous versions. Visual Studio 2010 includes SharePoint-specific project types and project item types, and includes powerful packaging, deployment, and debugging features that help increase your efficiency as a SharePoint 2010 developer.

Creating Dialogs and Ribbon Controls for SharePoint 2010

SharePoint 2010 provides new user interface components, such as server ribbons, and the new dialog platform. As a developer, you can create controls for the server ribbon and dialog boxes for the dialog platform.

Sandboxed Solutions for Web Parts in SharePoint 2010

SharePoint 2010 provides a new sandboxed environment that enables you to run user solutions without affecting the rest of the SharePoint farm. This environment means that users can upload their own custom solutions without requiring intervention from administrators, and without putting the rest of the farm at risk.

Configuring Profile Image Export in SharePoint 2010

It's no secret that I am thrilled with the new social features of SharePoint 2010. I am most excited about the new Profile Picture handling. I strongly believe that the more we can show the faces of our colleagues to one another the more connected we will feel. Clearly Microsoft feels that way as witnessed by the many features that make use of the Profile Image like the Activity Feed and Colleagues list

ClientAccessPolicy file in SharePoint 2010

I am upgrading my Silverlight demo code from the old beta to beta 2 and see that there are a few new considerations for the deployment of ClientAccessPolicy.xml files. In a previous post I demonstrated how to do this for SharePoint 2007. The heartburn that I get with that approach is any site collection owner or designer can drag the file into the site collection and open the site up to unwanted client access issues. In 2010 the virtual path provider no longer serves the files from the root of the site collection

Adding Search Refinements in SharePoint 2010

I have been playing around with SharePoint 2010 Search this morning. I love the new UI. The search refinements panel is just begging to be messed with. In my case I wanted to add the file extension JPG as an Image Type refiner.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend