Sandbox violation?

I’m getting a sandbox violation on the line "winHTML.HTMLViewer1.LoadPage(s,f) on the following code, if I comment out that line there is not problem.

dim s as string Dim f As New FolderItem s = Socket1.Post("https://www.jimasmith.com/......php",5) winHTML.HTMLViewer1.LoadPage(s,f) winHTML.ShowModal

How do I fix this?

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.

Works like a champ. Thanks.

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.