In general, it is not recommended to cook canned food in the oven. Cans are typically designed for storing food, not for cooking. When you heat a can in the oven, it can cause the can to explode or burst open, leading to potential injury or food contamination.
Canned foods are already cooked during the canning process to ensure their safety and long shelf life. If you want to heat canned food, it is best to transfer the contents to a microwave-safe or oven-safe dish before heating. This way, you can avoid the risk of a can exploding or releasing harmful substances into your food.
Always follow the instructions on the can or consult the manufacturer's recommendations for specific heating instructions for canned foods. If in doubt, it's best to err on the side of caution and choose alternative cooking methods.