Posts Categorized: .Net

Unit Testing Windows Phone Applications

Posted by & filed under .Net, CodeProject, Unit Testing, Visual Studio, Windows Phone.

Recently Microsoft released Update 2 for Visual Studio 2012. If you installed the Update 2, you will get a new project template, under Windows Phone, Windows Phone Unit Test App. This will help you to create unit test project for Windows Phone 8 applications. Once you create the project, necessary references will be added to [...]

Retrieving the COM class factory for component failed due to the following error: 800702e4.

Posted by & filed under .Net, .Net 4.0, Office Interoperability, Visual Studio, Windows Forms.

While working on some outlook C# application I got a COM exception like this. Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005. My code was simply straight forward, I was just creating the instance of the outlook application. And this code was used in a different [...]

Assembly Binding Redirection in .Net

Posted by & filed under .Net, .Net 4.0, ASP.Net, Windows Forms.

Today I come across an application crash due to version mismatch. The application executable was compiled using version 1.0.x.x, and we were using 6.2.x.x. Due to this version mismatch application was crashing. Unfortunately we don’t have the source code of this application with us. Later I got one solution using bindingRedirect. This configuration element will [...]

How to apply border color for TableLayoutPanel

Posted by & filed under .Net, .Net 4.0, Windows Forms.

The TableLayoutPanel control arranges its contents in a grid. TableLayoutPanel doesn’t have border color property, but you can write custom code in CellPaint event to create border. Here is the code snippet which will help you to create border and apply color for TableLayoutPanel Here is the screen shot of the Form in Design Time [...]

How to send email messages with embedded images

Posted by & filed under .Net, ASP.Net, CodeProject, Windows Forms.

While creating email messages with HTML content, normally the images are displayed with IMG tag, where the SRC attribute pointing to an image, which is hosted in the web server. Most email clients will not display the images, which is downloading from the web. Instead of pointing to web URL, you can embed image in [...]