Service Reference System.Net.WebPermission - InfoPath Dev
in

InfoPath Dev

Service Reference System.Net.WebPermission

Last post 07-05-2011 05:53 AM by michaelr524. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-05-2011 03:27 AM

    Service Reference System.Net.WebPermission

    Hi, I've created a C# Class Library with common classes I'm going to use in all my forms. I've signed the assembly and added [assembly: AllowPartiallyTrustedCallers] to AssemblyInfo.cs. I've created a Web Reference to the List sharepoint service in order to call GetListItems since I didn't manage to call it using InfoPath's DataConnection. Then I've added a reference to my assembly from a Form Template project from VSTA. After I publish this form to SharePoint and then open a new form from sharepoint using infopath client the web service call works fine. But if I try to preview the form locally by running it from VSTA I get a security exception telling me it's can't get System.Net.WebPermission. Now, I guess it works from the published form because it accesses the same sharepoint server as the one where the form is stored. My question is whether it's possible to also make it work when I preview it locally? It would make my development cycle much shorter (don't have to publish the form each time). Thanks, Michael
  • 07-05-2011 05:18 AM In reply to

    Re: Service Reference System.Net.WebPermission

    One thing you can do is set the security to Full Trust while you are working on the form, and change it back to Domain Trust right before you publish it.  Would that work?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-05-2011 05:53 AM In reply to

    Re: Service Reference System.Net.WebPermission

    Hey Jimmy! You are the best! Thanks, Michael
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.