C# code-behind file doesn't work with Infopath - InfoPath Dev
in

InfoPath Dev

C# code-behind file doesn't work with Infopath

Last post 02-10-2006 06:39 AM by Coita Thierry. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-10-2006 04:51 AM

    C# code-behind file doesn't work with Infopath


    Hi, I found a problem during Infpath Project development in VS 2005.

    I've created a new project in VS 2005 (Office -> Infopath form), this project is a simple Infopath Form wich will recieve and submit some data to my web-service.

    First of all I should notice that I didn't created any DataSource in design-time from Infopath Forms Designer, instead I am making all calls to web-service methods and filling Infopath forms controls from C# code-behind file.

    Then I wrote some C# code in generated Form's code-behind file, also I've added a WebReference to my web-service and wrote code for web service methods calls and Infopath controls filling.

    When I starting my project from VS (F5 or Ctrl + F5) everything works fine and I see the controls on my Infopath form are filled with data from web service.

    The problem occurs when I am making Project - Publish Form, the published form (xsn file) contains all dll and other necessary files, but when I runnig published form all controls are empty! It seems like my C# code doesn't executed and no exception or error messages does not appear.

    Does enybody knows what happens? I suppose that I should change my security configuration setting in .NET Framework configuration, is that correct?

    Thank you for your help or any ideas.
  • 02-10-2006 06:39 AM In reply to

    Re: C# code-behind file doesn't work with Infopath

    Hi,

    Welcome!

    Is your form in full trust?

    If not, you need to publish him in full trust!

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.