Logging: Using Elmah, Nuget in ASP.NET MVC 3 and Oracle database

Logging is one of the most important thing you must to thinking about when intend to building a production website. There are many many way to implement logging in a website, and it was not able to easily. So in this article, I will simplify the way to implement logging…

Continue ReadingLogging: Using Elmah, Nuget in ASP.NET MVC 3 and Oracle database

Stored Procedures Paging Solution in ASP.NET MVC 2

The article Server-Side Paging with the Entity Framework and ASP.NET MVC 3 describes how to paging using Entity Framework and ASP.NET MVC 3. Using Skip() and Take() extension methods is main idea of the article. But you can’t do it if your project using Oracle database. Because EF is not…

Continue ReadingStored Procedures Paging Solution in ASP.NET MVC 2

Develop a File IO ActiveX control in Microsoft .NET

Development 1. Use this guide to create your own ActiveX control Writing an ActiveX Control in .NET 2. Design your ActiveX as picture bellow: 3. Use following code behind 3. Create TestActiveX.htm Deployment 1. Copy FileIOActiveXControl.dll and TestActiveX.htm to the same folder 2. Go to IIS to create a new…

Continue ReadingDevelop a File IO ActiveX control in Microsoft .NET

Add Digital Signature to a PDF programmatically using iTextSharp and Microsoft .NET

You must to prepare bellow things: - iTextSharp library - Valid Certificate file (.pfx). It means the .pfx file not yet expired Use these guides to add digital signature to  a pdf file using iTextSharp 1. Add using statement 2. Add a Sign method Hope this help

Continue ReadingAdd Digital Signature to a PDF programmatically using iTextSharp and Microsoft .NET

Add Digital Signature to a PDF programmatically using Adobe SDK and Microsoft .NET

Requirement: - Adobe Professional Installed - Adobe SDK downloaded - Microsoft Visual Studio - Valid Certificate file (.pfx). It means the .pfx file not yet expired. Setup environment: - Copy sdkAddSignature.js from SDK to Acrobat\Javascripts folder - Optional: Create Your Own Test Certificate Code C# Code VB: Hope this help!…

Continue ReadingAdd Digital Signature to a PDF programmatically using Adobe SDK and Microsoft .NET

Combine Microsoft ReportViewer, WCF and ASP.NET

Scenario: - We have a existing Website portal using ASP.NET - We have a reporting desktop application using Microsoft ReportViewer - We want to share some report from reporting application to website portal Solution: - We use WCF as interface to integrated between ASP.NET and desktop applications - WCF will…

Continue ReadingCombine Microsoft ReportViewer, WCF and ASP.NET

“ORA-01461: can bind a LONG value only for insert into a LONG column” error in NHibernate

“ORA-01461: can bind a LONG value only for insert into a LONG column” happen when try to insert large text (> 4000 Unicode characters) using NHibernate and Oracle. Following are steps work around to fix the problem: 1. Using Clob or NClob data type Normally we use VARCHAR2 or NVARCHAR2…

Continue Reading“ORA-01461: can bind a LONG value only for insert into a LONG column” error in NHibernate

Reading CSV file by OdbcConnection and C#

CSV là một text file thường được sử dụng để export dữ liệu từ một nguồn CSDL nào đó. Đặc điểm của nó là cấu trúc đơn giản, nhẹ. Tuy nhiên, trong trường hợp người dùng muốn import dữ liệu từ CSV nó sẽ phát sinh một số vấn đề…

Continue ReadingReading CSV file by OdbcConnection and C#

WCF và tính tương thích với ASP.NET

Một sự khác biệt to lớn giữa các Web Services truyền thống ASMX và WCF Services là khả năng kích hoạt của chúng. Với WCF các services có thể được kích hoạt thông qua các giao thức ngoài HTTP như net.tcp, net.pipe hoặc WAS (Windows Activation Service). Trong khi ASMX…

Continue ReadingWCF và tính tương thích với ASP.NET