Showing posts from 2011

Silverlight 5 isavailable now.

Hi developers! good news from Microsoft. Silverlight 5 is now available for download and development. A lot of new improvements like H264 media hardware decode, XNA Api etc.

For more information visit

moved to Oslo

Dear friends
I have moved to Oslo, Norway
great country and people !

from November will work in a great Microsoft Team - Microsoft Development Center Norway

Business Rules Engine implementation to Message Flow

At this post I want to show how you can use message routing with BRE (Business Rules Engine)
It will allow information workes, analysts and admins to change routing condition values without
code changes, recompilations and downtime.

Message will be taken from a folder. Checked if value is greater than 1000 it will be moved to folder BIG, else it will be moved to folder small. Then Admin will change value to 2000 from BRE without code recompiling and downtime.

Lets first create BizTalk Project in Visual Studio

Then I will create Order Schema

Then will create 2 new elements: OrderID(string), VIP (boolean) and Amount(integer)
VIP field will be use to identify VIP order, which will be changed by BRE
Also if should be Distinguished field

Then create Routing orchestration
where I will use just created Schema as input and output type.

Create new Message with new OrderSchema type, Receive and Send Shapes.
Create Receive port and assign it to receive shape
Create Send port and assign…

SharePoint Server with Denali

Just was playing with Denali CTP 3 and was not able install SharePoint Server 2010

But had success when found SP1 for SharePoint Server

A lot of improvements since previous CTP
I also want to try new Business Intelligence Studio which should have new interface
previous CTP used Visual Studio 2008 for BI :-( so I have postponed all test will this CTP 3

DTA Purge and Archive Job Failed

Yes! It does not work "by default" when you install fresh BizTalk Server
How to fix it ?!

Open properties of the job and select Steps

Select Archive and Purge the only step and click Edit
change the parameters of the procedure
@nLiveHours tinyint to 1
@nLiveDays tinyint to 0
@nHardDeleteDays tinyint to 0
@nvcFolder nvarchar(1024) to '\\MyServer\backup'
@nvcValidatingServer sysname to null
@fForceBackup int to 0

the edited command should look like
exec dtasp_BackupAndPurgeTrackingDatabase 1, 0, 1, 'c:\backup', null, 0

save it and try to run job one more time

Reporting - IIF inside Sum gives unexpected #error in expression

Yes ! Was really confused with this error when saw it, missing details of the errors made me crazy
after 1 hour I got an idea.
so how it looked for the first time

=Sum(IIf(Fields!ContractID.Value <> 0, Fields!hours.Value,0))

I was 100% sure that it should work , but it did not !!!!
the reason is in Fields!hours.Value, it returns STRING which cannot participate in Sum expression
yes, now it's clear. So expression should look like

=Sum(IIf(Fields!ContractID.Value <> 0,CDbl(Fields!hours.Value),0.0))

hope this will save your time !!!

Reports integration with ASP.NET and WPF applications using Visual Studio and Report Builder 3.0

In this post I would like to show how to integrate very powerful reporting engine with your .NET application.
As Database I will use SQL Server 2008R2, ReportBuilder 3(free tool by MS), and Visual Studio 2010
I also will download Adventure Works sample database from

1. Create blank report in Report Builder, change title of the report

2. From left pane select Data Sources and add new Adventure Works Source

3. From the left pane create new Data Set Change name of data set to SalesDataSet select Data Source you have created Then run Query designer to build Select script which will return Data Table

4. Select
Production.WorkOrder.OrderQty Production.WorkOrder.DueDate Production.Product.ProductID Production.Product.Name
Click Ok,
in Parameter from Left pane add @Year as a parameter
then modify Query so it will include Year filter
SELECT   SUM(Production.WorkOrder.OrderQty) AS Sum_OrderQty   ,Production.Product.Name   ,Month(Production.WorkOrder.DueDate) as  FROM   Production.Product   INNER …
Awesome just got this cool award and very surprised ! Thank you Microsoft

MCT 2011

Awesome! Just renewed my MCT status for 2011.

CBA web site

New great SharePoint 2010 Server solution launchedThe site of Central Bank of Armenia -

Encrypting sections in configuration files

You can face a problem with your connection strings or other confidential and critical information is stored in configuration file when hosting web site or distributing application to clients.
You have many solution options in this case like using SSO, SSS, store encrypted data in a database. But these methods are time consuming and sometime expensive.
The solution I can offer is to encrypt data in configuration file using System.Configuration library from .NET
Add reference to System.Configuration to your project and run this code once
// Get the current configuration file. System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None);
// Get the section. ConfigurationSection section = config.GetSection("connectionStrings"); // Protect (encrypt)the section. section.SectionInformation.ProtectSection( "RsaProtectedConfigura…

new Silverlight 4 certification exam

Due to high interest for Silverlight 4 certification (70-506) and trainings I would like to post that new certification exam is available in Prometric centers
for details please check

You can register for exam at
for certification discounts and details send me a private message

BizTalk / SharePoint integration

BizTalk includes SharePoint adapter which can be used for sending and receiving data from/to SharePointYou could see that that sending adapter even is limited with 16 fields. But what to do if you want to send more then 16 fields, attach a file to Item, do manipulations with a List/Library etc.
I would like to recommend to use native web services from SharePoint which can be found at http://localhost/_vti_bin/lists.asmx
Use UpdateList to insert and update List Items you can use GetListItems method to serach for Items in a List
for more methods and description check
for other SharePoint Services check
which you can use by calling from orchestrations