Latest Entries »

If you ever experienced that your CSS is not working AT ALL on your web page, then you need to keep reading this article. It is as if your web page is from the stone age, no style or anything fancy, just text, black and white. All your CSS is not working. The ASP.NET is executing fine though, so what is wrong? View full article »


If you need to get DataTable’s original row index from a sorted DataGridView, here’s how. I actually get this code snippet from here. But just in case the post is deleted, so I re-write it to this blog. View full article »

If you have this error pop-up in your Visual Studio (ASP.NET web application project):

The type name ‘MembershipProvider’ could not be found.

Then you should View full article »

For you guys who got thrown this error by MySQL, you can try to check my solution. I googled but can’t find my answer. In my case, it’s not related to any threading or external service as discussed in stackoverflow threads. View full article »

I know there are already many web pages out there with the same topic, including from Microsoft itself.  But I found out that several people, if not many, still cannot make it through the firewall. The good news is there is an “extra step”, which has solve my problem. So if you have followed all the steps out there and still blocked, do NOT turn off firewall. You can try my way. View full article »

Today I create a Windows form in my project and I had a little problem. The KeyDown, KeyPress, PreviewKeyDown event is ignoring Enter key. Only KeyUp will accept the Enter key. Every other key will fire those events, except for Enter. This problem has wasted 1 hour of my time. View full article »

One of my software client just called and say “The application is not working after antivirus scan”. Then I turn on my laptop and do a remote desktop to the server. Turns out the error is caused by inactive MySQL service.

I tried to start it but I get the error “Error 1067: The process terminated unexpectedly”. Since this is not a fresh install of MySQL, so it can not be misconfiguration in “my.ini” file. My software client’s computer has this configuration:

  • Running Windows 7 x64
  • MySQL Community Server 5.1.30
  • .NET Framework 4.0
  • Avast Antivirus Free Edition

So this is my solution to recover the service: View full article »

I can connect my “standard” WCF with several programming languages like :

  • C# (WinForm and ASP.NET)
  • PHP
  • Java (Desktop)

Those programming languages (or architecture) uses XML SOAP to communicate with each other. But now, I need to expand my programming experience to mobile devices like Android, Windows Phone or iOS, which uses JSON format rather than XML SOAP. In this case, I need to transform the “standard” WCF into RESTful WCF so it can serve as back-end for those mobile devices.

Here is my “standard” WCF specification before transformation:

  • Self-hosted using C# WinForm
  • Has 2 endpoints: BasicHttpBinding and MexHttpBinding
  • Built using Visual Studio 2015 Community Edition
  • The “app..config” file:
    <?xml version="1.0" encoding="utf-8" ?>
    <binding name="BasicHttpBinding_I_service" maxReceivedMessageSize="2000000000" />
    <endpoint address="http://localhost:8888/service/can_sid/basic"
    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_I_service"
    contract="service_ref.I_service" name="BasicHttpBinding_I_service" />
    <behavior name="NewBehavior0">
    <serviceMetadata httpGetEnabled="true" />
    <serviceDebug includeExceptionDetailInFaults="true" />
    <service behaviorConfiguration="NewBehavior0" name="service_library.sb_service">
    <clear />
    <endpoint address="basic" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_I_service"
    contract="service_library.I_service" listenUriMode="Explicit" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <add baseAddress="http://localhost:8888/service/can_sid" />

And below are the steps I use to transform into RESTful WCF: View full article »

I get this error in my project with:

  • Visual Studio 2015
  • Crystal Report for Visual Studio 13.0.14
  • Visual C# Windows Application
  • Platform Target: Any CPU
  • 1 Crystal Report document (*.rpt)

If you find this error when executing your project, then you can try my very simple solution: View full article »

Suddenly my Visual Studio 2013 can not copy DataTable in DataSet Designer. It always returns error “Requested Clipboard operation did not succeed”. Here’s my solution to re-enable my clipboard operation: View full article »

%d bloggers like this: