A sensor for measuring the concentration of an analyte in a solution is disclosed. The sensor may be adapted for use as either an amperometric or a potentiometric sensor. It includes a membrane having a biologically active protein immobilized within. The membrane is attached and reliably sealed to a housing by means of ultrasonic welding, either directly or indirectly. Further, the membrane may be compressed to a fraction of its original dimensions. Metallic parts of the device may, optionally, be physically isolated from the sample solution to reduce corrosion. These features operate synergistically so that the claimed device exhibits relatively fast response and recovery times, is reliably leak-proof, and may be constructed in relatively small sizes.