Adding SharePoint SafeControl Element using Visual Studio 2010 and replaceable parameters

Problem
While trying to use my custom layouts page, I received an exception that indicated that my custom class was not registered as a safecontrol in the web.config.


Process information:
Process ID: 5272
Process name: w3wp.exe
Account name: DEV\spAppPool

Exception information:
Exception type: HttpParseException
Exception message: Could not load type 'Capgemini.SharePoint.Pex.Example.Layouts.Capgemini.SharePoint.Pex.Example.@default'.

Cause
I was confused, didn't visual studio created the SafeControls elements for me? WSPBuilder did it for me in the past so why won't visual studio do it for me?

Solution
Actually it can but it doesn't by default, Microsoft provided a nice and easy visual studio interface for us. So here it goes…

1. Open package.package in your visual studio project
2. Notice the 3 tabs (Design,Advanced and Manifest), Click on the manifest tab
3. You

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Unit testing SharePoint 2010 using Pex and Moles: templates unavailable

A few months ago I attented a VISUG session about pex and moles (Peli De Halleux) at Microsoft Belgium. I was very curious because this technology made it possibe to unit test SharePoint solutions without 3th party tools…

So here it goes:
I downloaded the installer to my development environment and launched the setup

Everyting works fine except the part where I want to prepare my Stubs and Moles. You need to create a new .moles file based upon a new template called Moles and Stubs for Testing. the only issue was, this template was nowhere to be found !

the solution was quite simple, open command prompt and enter

It takes a while but after a few moments it is completed, now open Visual Studio 2010 again and select your Moles and Stubs for Testing template.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

SharePoint running on Amazon Elastic Compute Cloud (Amazon EC2)

Today I had the chance to configure a stand-alone sharepoint server on the Amazone EC2 (Amazon Elastic Compute Cloud) environment.

It takes a while to learn all the documentation and different options but if you are familiar with Hyper-V or any other technology, you will discover that the user interface of EC2 is very easy to understand.

]

These are the links I used to configure the EC2 server:
http://docs.amazonwebservices.com/AWSEC … rtedGuide/

This firefox add-in elasticfox is a real timesaver:
http://developer.amazonwebservices.com/ … nalID=1797

Setting the credentials in elasticfox:
https://www.amazon.com/gp/redirect.html?ie=UTF8&location=https%3A%2F%2Faws-portal.amazon.com%2Fgp%2Faws%2Fdeveloper%2Faccount%2Findex.html%2F?action=access-key&tag=bucket-20

Problem 1: after each reboot the server receives a new servername, this is not so interesting because SharePoint and SQL server are not so happy with this. Resulting in “cannot connect to the configuration database”. It seems like 1 little checkbox is the solving answer!
]
After I disabled this setting, renamed my server and rebooted… the whole SharePoint server worked like a charm!

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)