Trying something like Dim F As FolderItem = SpecialFolder.Temporary.Child("somepage.html") and see what that gets you. You’re trying to use a FolderItem in a location you don’t have permission.
Just following up, when inside the sandbox, you should only obtain FolderItems from a SaveAsDialog or OpenDialog, or within certain SpecialFolder locations. You should expect GetFolderItem and New FolderItem to always fail.
There are of course exceptions to every rule, but this is a good guideline to work from.