Latest Entries »

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 »

Advertisements

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" ?>
    <configuration>
    <system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="BasicHttpBinding_I_service" maxReceivedMessageSize="2000000000" />
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="http://localhost:8888/service/can_sid/basic"
    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_I_service"
    contract="service_ref.I_service" name="BasicHttpBinding_I_service" />
    </client>
    <behaviors>
    <serviceBehaviors>
    <behavior name="NewBehavior0">
    <serviceMetadata httpGetEnabled="true" />
    <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
    </serviceBehaviors>
    </behaviors>
    <services>
    <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" />
    <host>
    <baseAddresses>
    <add baseAddress="http://localhost:8888/service/can_sid" />
    </baseAddresses>
    </host>
    </service>
    </services>
    </system.serviceModel>
    </configuration>

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 »

I am developing a project with:

  1. Windows 7 x64
  2. Visual Studio 2013
  3. Crystal Report
  4. Build in “Any CPU” mode.

When I execute the project, I get the long-message error with the code 80040154 (Class not registered) and it’s from Crystal Report exception. View full article »

%d bloggers like this: