InfoPath cannot open the selected form because of an error in the form's
'InfoPath cannot open the selected form because of an error in the form's. Policy settings prevent opening Internet forms with managed code. To fix =this problem, contact your system administrator."
When i tried to run the InfoPath Solution from Visual studio 2008, i'm getting this above mentioned error. When i googled also i don't find any good solution. After that i changed the security setting of the form to fully trusted, then it worked for me. I don't know this is the right solution but it also solve the problem :)
Step: go to tools>Form options>Security and Trust> select Fully Tructed radio button