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 [...]
Posts Categorized: .Net 4.0
Assembly Binding Redirection in .Net
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
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 [...]
Building a language translation bot using Skype and C#
In Google talk, there was some bot service available which will help to translate from one language to another. You can implement similar service using Skype with the help of Skype4COM.dll. In this implementation for language translation, the Bing soap API is used. Skype4COM is a Windows based COM DLL which acts as a shim [...]
How to upload file to FTP server using C#
From .net framework 2.0 onwards .net supports FTP operations. Like HttpWebRequest and HttpWebResponse, for FTP operations, FtpWebRequest and FtpWebResponse classes are available, under System.Net namespace. Here is the code snippet, which will help you to upload a file to FTP server, using C#. And here is the GetFileData function, which will return byte array from [...]
How to create controls dynamically in asp.net and retrieve values from it
Sometimes you may require to create controls dynamically in asp.net. Because of asp.net page life cycle, you may loss the created controls on next post back(ASP.Net framework recreate the page on postback). You can resolve this issue by overriding LoadViewState() and SaveViewState() methods. LoadViewState() method restores view-state information from a previous page request that was [...]