• I am not sure of your SGen error and the permission errors are related. For the SGen error you may want to look at the link: http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/fa59738e-11e1-45f8-a81f-613c6bb377db/ . It may give you some ideas.

    For the permission error, can you check if you are using any console.writeline or message boxes in you code?