开发者

InfoPath call web service locally

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开发者_如何学JAVA 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


I found a workaround which enables me to develop and debug easily. While developing I set the form trust level to Full Trust. Before deploying to Sharepoint I change the trust level back to normal.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜