Programming Atmega8 with AVRISP mkII Error ispProgramMem
Recently I was debugging with mkii in atmel studio 6 win7 x64. In sudden, after couple of tens flash writes, atmel studio stucked with same error. I resolved issue by playing with frequency of ISP clock in Device Programming Window.

Anthony