Unable to save config in ASA 5505

I have this issue, I save the configuration in the ASA 5505  using write memory or using copy run start but when I unplug the power  cord and plug it back in the ASA gets its factory default configuration.

That symptom could also be caused by a wrong config-register. What does the following command give you?

asa# sh ver | i register

Configuration register is 0x1

If it is not 0x1, change it to that value:

asa(config)# config-register 0x1