Tag Archives: SharePoint 2010

SP2010 Sandbox Development Tip

If you want to make sure that you aren’t using any of the restricted APIs before you deploy your solution to a sandbox environment, manually reference your project against:

[SharePoint Root]UserCodeassembliesMicrosoft.SharePoint.dll  

If your code compiles, then you’re pretty safe!

NEVER DEPLOY code with this Microsoft.SharePoint.dll reference, instead reference the Microsoft.SharePoint.dll in

[SharePoint Root]ISAPI folder.

From the SharePoint 2010 book I’m reviewing

Debugging SP2010 Sandbox Code – Short and Sweet

If you find yourself in a situation when you need to attach to a process from VS 2010, to debug,  and you’re code is running in a “sandbox”.  You need to attach to the process SPUserCodeService.exe, not w3wp.exe.

SharePoint 2010 hosts sandbox code in a secure service – the user code service – so it can monitor resources and make sure the user’s code isn’t performing any action that could compromise the platform.

From the SharePoint 2010 book I’m reviewing

SP2010 Developer Dashboard

The SP2010 Developer Dashboard allows developers to review object model calls, database queries, web part events – and the timings for these various happenings.

The following code enables the dashboard:

SPPerformanceMonitor SPPerfMon;
SPPerfMon = SPFarm.Local.PerformanceMonitor;
SPPerfMon.DeveloperDashboardLevel = SPPerformanceMonitoringLevel.On;
SPPerfMon.Update();

The following code turns it off again:

SPPerformanceMonitor SPPerfMon;
SPPerfMon = SPFarm.Local.PerformanceMonitor;
SPPerfMon.DeveloperDashboardLevel = SPPerformanceMonitoringLevel.Off;
SPPerfMon.Update();

Development Setup for SP2010

Some important points to remember when developing against SP2010:

  • Make sure your Visual Studio project is set up for .NET 3.5, not .NET 4.0
  • Run Visual Studio as an Administrator to load debugging symbols
  • Make sure your project is set to compile for Any CPU or x64 (not x86 by default), otherwise your code will throw a FileNotFoundException

From the SharePoint 2010 book I’m reviewing

Provision 2010 Farm without the Mess

More and more research is showing that the key to lifelong good health is what experts call “lifestyle medicine” — making simple changes in diet, exercise, and stress management. To help you turn that knowledge into results.

We asked three experts — a naturopathic physician, a dietitian, and a personal trainer — to tell us the top five simple-but-significant lifestyle-medicine changes they recommend.

Besides giving you three different takes on how to pick your health battles, this list gives you choices you can make without being whisked off to a reality-show fat farm — or buying a second freezer for those calorie-controlled, pre-portioned frozen meals. Boost your dietary results with Biofit.

JAMES ROUSE, N.D.

NATUROPATHIC PHYSICIAN, TRIATHLETE, CHEF, AUTHOR AND HOST OF TV’S “OPTIMUM WELLNESS,” HEALTH-TIP SEGMENTS FEATURED ON NBC AFFILIATES IN SEVERAL MAJOR CITIES.

1. THINK POSITIVE AND FOCUS ON GRATITUDE

Research shows a healthy positive attitude helps build a healthier immune system and boosts overall health. Your body believes what you think, so focus on the positive.

2. EAT YOUR VEGETABLES

Shoot for five servings of vegetables a day — raw, steamed, or stir-fried. A diet high in vegetables is associated with a reduced risk of developing cancers of the lung, colon, breast, cervix, esophagus, stomach, bladder, pancreas, and ovaries. And many of the most powerful phytonutrients are the ones with the boldest colors — such as broccoli, cabbage, carrots, tomatoes, grapes, and leafy greens.

3. SET A “5-MEAL IDEAL”

What, when, and how much you eat can keep both your metabolism and your energy levels steadily elevated, so you’ll have more all-day energy. A “5 meal ideal” will help you manage your weight, keep your cool, maintain your focus, and avoid cravings.

4. EXERCISE DAILY

Did you know that daily exercise can reduce all of the biomarkers of aging? This includes improving eyesight, normalizing blood pressure, improving lean muscle, lowering cholesterol, and improving bone density. If you want to live well and live longer, you must exercise! Studies show that even ten minutes of exercise makes a difference — so do something! Crank the stereo and dance in your living room. Sign up for swing dancing or ballroom dancing lessons. Walk to the park with your kids or a neighbor you’d like to catch up with. Jump rope or play hopscotch. Spin a hula hoop. Play water volleyball. Bike to work. Jump on a trampoline. Go for a hike.

5. GET A GOOD NIGHT’S SLEEP

If you have trouble sleeping, try relaxation techniques such as meditation and yoga. Or eat a small bedtime snack of foods shown to help shift the body and mind into sleep mode: whole grain cereal with milk, oatmeal, cherries, or chamomile tea. Darken your room more and turn your clock away from you. Write down worries or stressful thoughts to get them out of your head and onto the page. This will help you put them into perspective so you can quit worrying about them.

SharePoint 2010 Posts Coming

image

It’s been quiet on my blog for some time, the usual excuses blah blah.  The good news is that I intend to post plenty about SharePoint Server 2010, which was recently released to partners as a private beta. 

I am currently honoring my NDA agreement with Microsoft, so no posts until the beta goes public later in the year, but that’s not to say I won’t be busy writing in the background ready for the announcement date.

Watch my blog for more details…