My reading List

There are two good ways you can update the web.config using a feature. The first way that I will write about today is by adding an xml file to the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\CONFIG folder and use a feature receiver to apply the modifications.

This method will apply web.config modifications to all web applications excluding the central admin web application.

Here is the link to the MSDN article: http://msdn.microsoft.com/en-us/library/ms439965.aspx

image

So the first thing I did in Visual studio is to create a mapped folder to the config folder under the 14 hive. After that I created an xml file in the format webconfig.*.xml (replace * with your own text).

This is the contents of my xml file:

<actions>
  <add path="configuration/appSettings" id="{F890379B-C989-457B-A350-26D4C8909FA9}">
    <add key="MySetting" value="MyValue" />
  </add>
</actions>

 

In the xml file I have added an add action that points to the appSettings in the web.config. The child of that element is the element that I want to add under appSettings.

IMPORTANT!!! Now the one thing the MSDN article does not explain is the role of the id attribute. If you do not include an id attribute with a GUID as a value, the modification will be added multiple times to the web.config.

So you see this can be anything from a safeControl Entry to a Custom sitemap provider.

So the next question to ask is “How do you apply the settings?”. Well the answer is quite easy. First I created a farm scoped feature that contains an event receiver.  This event receiver contains one line of code in the FeatureActivated event.

 public override void FeatureActivated(SPFeatureReceiverProperties properties)
 {
     SPWebService.ContentService.ApplyApplicationContentToLocalServer();
 }

 

At this point you can deploy your solution and make sure your feature is activated. Here is a snippet of my web.config after the feature has been activated.

 

image

 

Advantages:

  • Easy set up.
  • Hardly any code.
  • You do not lose any custom web.config entries when SharePoint is updated.
  • An easy way to deploy custom web.config modifications to all web applications (excluding the central admin web application)

 

Disadvantages

  • All web applications receive the modifications and may not be the best way if you want to limit your modifications to one web application. You should use another method. See Part 2

 

In the next couple of days I will have another post (part 2) about modifying the web.config in SharePoint 2010 by using a feature.

I have not gotten into the Office 365 beta yet and I am very eager to have a good look at it. I did however find some good documentation on the different services. You can find documentation on Microsoft Exchange Online, Microsoft Lync Online and Microsoft SharePoint Online via the link below.

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6c6ecc6c-64f5-490a-bca3-8835c9a4a2ea

Below is a quick summary of the features I found in the SharePoint Online Standard Documentation that you can find in the link above.

When we are looking at the SharePoint Standard vs. SharePoint Online, SharePoint Online will not support the following:

  • Word Automation Services
  • Records Center
  • Federated Search
  • Business Data Connectivity
  • External Lists
  • Secure Store Service

But on the other hand SharePoint Online will have some Enterprise offerings

  • Excel Services
  • Visio Services
  • Access Services
  • InfoPath Forms Services

Some new stuff that SharePoint Online will include is

  • Extranet Access
  • Anonymous Access
  • Single Site Collection Search
  • Office Web Apps

 

All this of course is subject to change because it is in the beta stage!!!!

I was trying to modify the navigation in a portal I was developing and for some reason it could not be modified. And like any good developer I checked my logs and I found the following error:

“Unable to retrieve TopNavigationBar SPNavigationNodeCollection from Web at: http://server. The SPNavigation store is likely corrupt.”

image

I found out it was because NavBar element was missing in the onet.xml. Once I put this element in the onet.xml I deleted the site collection and created it again and I was able to edit the top navigation.

image

Every once in awhile I need to check the property bag on a SPWeb object. I have made a quick PowerShell script to view all the properties on the root web. You can check other webs in the site collection by adding the relative Url to the OpenWeb Method.

Here is the 4 lines of code.

Add-PSSnapin "Microsoft.SharePoint.Powershell" -ErrorAction SilentlyContinue
$site = spsite "http://server"
$web = $site.OpenWeb()
$web.AllProperties

In most cases you will want to sync only the enabled users from AD into SharePoint. There is one extra step needed to do this.

http://support.microsoft.com/kb/827754

BELOW IS A SUMMARY FROM THE LINK

To import user profile information of user accounts that are enabled in Active Directory to SharePoint Server 2010, follow these steps:

1. On the Manage Profile Service page, click Configure Synchronization Connections.

2. On the Synchronization Connections page, click the Active Directory connection that you want to edit, and then click Edit Connection Filters.

3. On the Edit Connection Filters page, follow these steps:

1. In Exclusion Filter for Users, change the Attribute drop-down to userAccountControl.

2. In Exclusion Filter for Users, change the Operator drop-down to Bit on equals.

3. In the Exclusion Filter for Users, select Filter box typeto 2.

4. Click Add.

4. Click OK.

I had some problems using SharePoint to LINQ when SPMetal did not generate any properties for my Taxonomy Fields.

Andrew Connell has an excellent post on this.

Extending LINQ to SharePoint Entity Models for SharePoint Server 2010 or Custom Field Types

I found this really cool tool to create Regular JavaScript from C#. You can find it here Script#.

Other then that there is not much more to say other then trying out this cool tool. It has been mentioned that Microsoft has used this tool to create some of the JavaScript found in SHarePoint2010.

Here is some general information about Training and Exams for SharePoint 2010

http://www.microsoft.com/learning/en/us/training/sharepoint.aspx

They say this summer (I think July) there will be certification exams available.

Here are the links to the exam information. I will update the links to 70-667 and 70-668 when they come available.

70-573 TS: Microsoft SharePoint 2010, Application Development
70-576 PRO: Designing and Developing Microsoft SharePoint 2010 Applications
70-667 TS: Microsoft SharePoint 2010, Configuring
70-668 PRO: SharePoint 2010, Administrator

 

And if you are a Microsoft partner

SharePoint 2010 Ignite Online for IT Professionals

SharePoint 2010 Ignite Online for Developers

More information about Ignite Online training on the Microsoft SharePoint team blog

UPDATE: SharePointBuzz has some more links to some training sessions. Here is the link.

http://www.sharepointbuzz.com/archive/2010/04/23/sharepoint-2010-developer-hands-on-labs-and-certification-preparation-sessions.aspx

The title says it all folks. Microsoft SQL Server 2008 R2 has now been released to manufacturing. The article says it will be available by download within the next couple of weeks.

However I went to the SQL 2008 R2 home page and clicked the try now button. I’m downloading something. I hope its not the CTP. I guess we will see when its done.

Hers the link the the SQL Server Blog

http://blogs.technet.com/dataplatforminsider/archive/2010/04/21/sql-server-2008-r2-released-to-manufacturing.aspx

As I am normally on my development machine I want to be able to run any PowerShell scripts as I need. By default I cannot do this because the Execution Policy for PowerShell is set to Restricted By Default.

There are 4 policies:

  1. Restricted
  2. AllSigned
  3. RemoteSigned
  4. Unrestricted

To see the current policy of your machine use the following command:
Get-ExecutionPolicy

To set the policy so you can run your all your scripts use the following command.
Set-ExecutionPolicy Unrestricted

By switching to this policy you make your system less secure. Probably not recommended for production machines.

See the Following URL for more information: http://technet.microsoft.com/en-us/library/ee176961.aspx