jeudi 21 août 2008

Install Microsoft Hyper-V on a HP Proliant Server


After installing Hyper-V on a Windows Server 2008, i get an unclear error message when trying to start a virtual server.


The problem was coming from my server's BIOS configuration. Here the two parameters to set :


Advanced Options > Processor Options > Intel (R) Virtualization Technology => Enabled
Advanced Options > Processor Options > No-Execute Memory Protection => Enabled


Press F10 to save your changes and restart the server.

mercredi 20 août 2008

Comment personnaliser les mail d' alertes de SharePoint

J' ai trouvé sur internet un post expliquant comment personnaliser les mail d' alertes envoyé par SharePoint. En voici la traduction :


Vous pouvez modifier le contenu de l' alerte via le fichier alerttemplate.xml se trouvant dans :


\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML. (1033 pour la version anglophone de SharePoint)


Ce fichier défini le format des mail ainsi que les query CAML pour chaque liste.


Par exemple, Si vous voulez modifier le contenu d' une alerte pour une document library, trouvez la ligne :



et modifier le code HTML.


Vous pouvez retrouver le post original ici

How to customize the built-in alert mail in SharePoint

I found on the internet a very interesting thread about the customization of built-in alert mail in sharepoint.

mardi 12 août 2008

Add a new icon for a document type in document library

When you add a document in a document library, SharePoint display an icon in the Type column based on the file type.

However, some extensions are not managed out-of-the-box by SharePoint. It's case for PDF file for example.

Start by adding a new icon in this folder : C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES.

In my case, i called it ICPDF.gif. The recommended size is 16px by 16px.

Now you have to link your icon with the PDF extension. You can do that i
n the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\DOCICON.XML file.

Add this line


in the section.
do an iisreset.
Here is the result :

Ajouter un nouvel icône pour les types de document dans une document library

Quand vous ajoutez un document dans une document library, Sharepoint affiche un icône dans la colonne Type de la liste. Cette icône correspond au type de fichier.


Cependant certaines extensions ne sont pas gérées de base, c' est le cas des fichiers PDF par exemple.



Commencez par ajouter le nouvel icône dans le répertoire : C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES.



Dans mon cas je l' ai appelé ICPDF.gif et sa taille est de 16px sur 16px pour respecter la norme utilisée par SharePoint.



Il faut ensuite faire le lien entre cet icône et l' extension PDF. Cela se fait dans le fichier : C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\DOCICON.XML.



Ajoutez la ligne :





dans la section du fichier.


Terminez l' opération par un iisreset.
voici le résultat :


lundi 4 août 2008

Read web.config parameters from a Silverlight application

Silverlight is an RIA so the application only live on the client side. Sometime it's a good idea to store parameters on the web.config file (i.e a web service endpoint).


Of course it's impossible to read the configuration file directly from the application running on the client.


What's the workaround ?
The Silverlight application is host on an aspx page in a control. So it's possible to get a web.config item on the page loading using the ConfigurationManage :

string _baseUrl = ConfigurationManager.AppSettings["EndPointAdress"];


After you must give this parameters to the Silverlight asp.net control, you can do that via his InitParameters property :


SLControl.InitParameters = "EndPointAdress=" + _baseUrl;


Last step : get the parameter in the Silverlight application. You must do this step in the App.xaml.cs file, in the Application_Startup method :


private void Application_Startup(object sender, StartupEventArgs e)

{

string _baseUrl = e.InitParams["BaseUrl"];

}


That's all ! :)