SharePoint 2010 – renaming features and web parts in VS.NET 2010 SharePoint Solutions

 

  1. In solution, select the Feature

    clip_image002

    Change the “Folder Name” property to new name. Press Enter – VS.NET will try to help you rename everything correctly.  The reason this field is called “Folder Name” is because SharePoint packaged solutions are deployed to the 14 HIVE, and are organized by folders there.
    Double click on the feature to bring up the Feature designer UI, you still need to change the Title and Description

    clip_image004
  2. To rename the web part

    clip_image006

    Change the Folder Name
    You still need to change the actual UserControl file name

    clip_image008

    As well as the user control filename, class name… standard .NET stuff.  Some tools such as VS.NET’s rename tool, or if you use Resharper, can help you with class renaming.
  3. WARNING: generally renaming packages is very bad after you have deployed to production. This should not be done lightly. 

SharePoint 2010 and Silverlight

Was working on a presentation on SharePoint 2010 and Silverlight.

Finally, I get to marry my two favourite technologies in one awesome demo.

 

There’s not a lot of people blogging about this yet, but what we were digging up was very delightful.

In bullet point form – because this is a brain dump blog post, and if you want to know how everything ties together you’ll have to catch up to one of the user groups where I present this stuff (or Adam Cogan… he gets around a lot more than me):

Technologies that made it possible:

  • SharePoint web services
  • SharePoint REST / OData services NEW
    • This is actually great news for the AJAX / JavaScript crowd.  Technically, you can write JQuery solutions that will query SharePoint for you.
  • Microsoft.SharePoint.Client.dll(s), and the corresponding Microsoft.SharePoint.Client.Silverlight.dll(s) – which are awesome wrappers
  • CAML is nearly gone, but still lingers on for huge data processing.
  • LINQ to SharePoint is the new crafting knife
  • Silverlight XAP files can be uploaded anywhere
  • Silverlight web part can load XAP files and run them
    • So a user that can upload a short movie to SharePoint, then configure a Silverlight movie player to play that movie… already has the permissions required to run custom XAP applications.
  • Which, if you stop and think about it, is a “different” deployment model!

ASP.NET "5.7.1 Unable to relay for email" when SmtpClient.UseDefaultCredentials = true

 

Was looking at a problem with Andy regarding using SmtpClient.UserDefaultCredentials = true, and sending emails within an authenticated WCF service.

We can send emails within the domain without any issues, but when sending emails outside of the domain the mail server rejects us with the 5.7.1 Unable to relay for [email protected]

The easier fix would probably be to UseDefaultCredentials = false, and specify a NetworkCredential(username,password).  But we were stubborn and didn’t want to have to enter a email address somewhere in the web.config.

While investigating – we realized that if we specify the mail server by IP address instead of DNS name – then the email will be delivered.

 

Our suspicions are that the Exchange mail server has different rule sets to decide if it trusts the source to be somewhere local.  If the IP address specified is a local network IP – it seems to relax the relay rules somewhat.

SharePoint 2010 Speed, and Boot to VHD

Been pouring through all the new goodies in SharePoint 2010 like a kid opening his first Christmas present -
So much fun, so little time.

A few people have made the comment that SharePoint 2010 Public Beta runs pretty slowly for demo’s – here’re a few suggestions I’ve noticed that helps for me:

  1. You need more than 2GB of RAM for SharePoint on your demo machine. 
  2. Ideally, a generous amount of hard drive space

My setup has worked pretty well for me:

  1. Host is Win7 x64
  2. Created a VHD (virtual hard drive) with about 50GB allocated space. 
  3. Installed Windows 2008 R2, SQL Server 2008, SharePoint 2010 public beta, Office Web Apps, and Office 2010 client apps.
  4. Configure the VHD as a bootable device (new in Win7)
  5. On start of laptop, I get to choose to boot into Windows 2008 / SharePoint 2010 directly, which allocates all the laptop’s resources to the VM
  6. Oh – grab the ATI display drivers for DELL (see my previous post) to make sure Windows 2008 R2 can display via an external projector – ahead of the presentation.  (I nearly had a panic attack but got it all sorted before I had to go on stage).

The best part is when we move on from the public beta, I’ll just copy a new VHD over the same directory under Win7, then it’s all set.

Ah another weekend is upon us…

And I’m well equipped for this weekend, I’ve got two fun activities to do:

  1. Go camp out in http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/ and ambush people asking simple SharePoint questions – going to aim for two badges – don’t really know how long that will take.
  2. Peter Gfader introduced me to http://projecteuler.net/ I’m up to question 3 and decided to solve them using a combination of FireFox + FireBug Console and JavaScript (ECMAScript)