You need to make sure are hitting with the top of your foot (near where you foot meets your shin) and you should be wary of what targets you pick. I kicked a heavy bag hard with my foot in my karate class and it hurt alot. I had to ice it and it was swollen the next day. Apparently my sensei filled that part of the bag with sand.
If you caught you partner on the knee that might be what hurt you or you may have hit with your foot near your toes. Hitting with the foot is okay. If you can't reach with your shin, its the next best thing. Of course though, hitting with your shin is always the best thing.