<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<file name="MyPrivateCOM.dll">
<comClass clsid="{AC78B8E2-6C4D-11d1-ADE2-0000F8754B99}" threadingModel="Apartment" />
</file>
</asmv1:assembly>
* This source code was highlighted with Source Code Highlighter.
Tuesday, August 16, 2011
How to register COM-class within the application manifest file
Saturday, March 5, 2011
How to install SQL Server Management Studio Express 2008
In order to install SSMSE 2008 you need to perform the following steps:
- Download the installation package and launch it.
- Click "New SQL Server stand-alone installation or add features to an existing installation".

- Wait untill installation setup support files and configuration checks, then click OK and Install.
- Click "Perform a new installation of SQL Server 2008", but not "Add features to an existing instance of SQL Server 2008" (!!!).

- Click Next in the Product Key dialog even if all the options are disabled.

- In the feature selection dialog enable Management Tools feature and click Next.

- Wait untill installation performs an additionnal configuration checks. Then click Install. Note: You might receive a configuration error, if you have SQL Server 2005 Express tools already installed on the machine. In my case I removed SQL Server 2005 Express tools. But it was not enough. I also used solution provided here (removing registry key). It was helpfull.

- Wait untill installation completed. Enjoy!
Thursday, December 16, 2010
Using RouteValueDictionary to test anonymous objects in C#
var someObject = new {someProperty= "someValue"};How to inspect value of the id property? You need a wrapper, that is able to index anonymous objects. For example, RouteValueDictionary.
Here is code:
var wrapper = new RouteValueDictionary(someObject); Assert.AreEqual("someValue", wrapper["someProperty"]);
If your ASP.NET MVC controller returns JsonResult, you can use this approcah to test contents of the Data property, which usually references to some anonymous object.
Thursday, September 9, 2010
Beyond Multiple Choice: Lab Exam Demonstration for Developers
Link: http://j.mp/cGIn69.
You can leave your feedback by completing the survey at http://j.mp/beRxTG.
Friday, August 20, 2010
Great ASP.NET MVC 2 (+ EF 4.0) sample
Recently I``ve found a great sample project on the codeplex that shows how to build web applications with ASP.NET MVC 2. I speak about MVC Music Store.
First of all, this project was interesting for me because it demonstrates how to organize data access via Entity Framework 4. There are also a lot of nice stuff in this project, including:
- Templating, Data Annotations, Validation;
- View models;
- Client-side validation, jQuery and AJAX helper methods;
Project includes 80-page PDF walktrough tutorial that describes in details how to create sample application starting from clicking File -> New Project.
You need Visual Studio 2010 and ASP.NET 4.0 to run samples.
ASP.NET MVC 2 is the latest official release at the current moment (ASP.NET MVC 3 is still under development). So, this tutorial is very actual now. I recommend it to everyone who are not familiar with ASP.NET MVC technology. Moreover, this tutorial might be useful if you would like to understand how to use Entity Framework 4 within your ASP.NET MVC website.
Friday, May 28, 2010
Dependency injection and Microsoft Enterprise Library validation app block
- Access DI container via a static class, that has a reference to it;
- Use SelfValidationAttribute in the class you have to validate;
- Define in your class a public void method that takes a single parameter of type ValidationResults;
- Decorate this method with a SelfValidationAttribute;
- Decorate your class with a HasSelfValidationAttribute;
- [HasSelfValidation]
- public class CreateProductViewModel
- {
- private readonly IProductComponent
_productComponent;
- public CreateProductViewModel(IProductComponent productComponent)
- {
- _productComponent = productComponent;
- }
- [StringLengthValidator(1, 20)]
- public string ProductName { get; set; }
- [SelfValidation]
- public void
IsDuplicateProductName(ValidationResults results)
- {
- var product =
_productComponent.GetProductByName(ProductName);
- if (product != null)
- results.AddResult(new ValidationResult("Product with same name already exists", null,
"ProductName",
null, null));
- }
- }
* This source code was highlighted with Source Code Highlighter.
- var validator = ValidationFactory.
CreateValidatorFromAttributes<CreateProductViewModel>();
- ValidationResults results;
- validator.Validate(createProductViewModelInstance, results);
* This source code was highlighted with Source Code Highlighter.
Sunday, May 9, 2010
Specifying the default browser for running ASP.NET MVC projects in VS2008
- Open/create a simple (non-MVC) web site in the Visual Studio.
- Select any .aspx file, or the site root in the Solution Explorer window.
- Go to File -> Browse with...

