While backing up a database from WSP or from Msqlmanagement studio, it fails with error
"Cannot open backup device. Operating System error 5"
Solution:
Kindly make sure that the sql express service is running with user "localhost\administrator"
If not,
You can change the log on for the service from
Run > services.msc > go to the respective service name > right click properties > log on
Here you can change the user that runs the service.
I changed the service to run from localhost\administrator and than I could backup the database without any issue.
Thank you,