Closed-cell spray insulation, a rigid medium-density material, can be used in exterior applications such as continuous insulation applications, as well as interior applications. This type of foam insulation has a higher R-value per inch making it also suitable for small areas that require the highest possible R-value to meet building code requirements. Closed-cell spray foam’s rigidity help reject bulk water making it a recognized flood-resistant material by FEMA.
I have used the Froth-Pak 200 to air-seal rim joists--the area above the foundation wall in a basement. The first time I used it I did not shake the canisters well enough and the foam did not cure properly. Don't just shake the box for a few seconds. I take the tanks out of the box so I can shake/invert each tank for a minute or two. You will be able to hear the chemical sloshing around in the tanks. Also, don't ignore the recommended temperature for application--around 75 degrees F. https://www.youtube.com/watch?v=ggLAUsiuI_o&feature=youtube_gdata
Spray Foam Professionals
A. You can use closed-cell spray foam that way if you want, although you should realize that the spray foam will prevent the roof sheathing from drying inward. This approach should only be used if the roof sheathing is bone dry, because it will never dry when sandwiched in this manner. Most building scientists would prefer to see fiberglass rather than closed-cell spray foam under the roof sheathing in this type of assembly.