Web Service with Session State Enable doesn't work in Infopath Web Services - InfoPath Dev
in

InfoPath Dev

Web Service with Session State Enable doesn't work in Infopath Web Services

Last post 03-11-2009 02:02 AM by Kid of the neon. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-11-2009 02:02 AM

    Web Service with Session State Enable doesn't work in Infopath Web Services

     There is a ASP.NET Web Service which uses SessionState. Let's see it's 2 methods:

            [WebMethod(EnableSession = true)]

            public string SetUser(string userName)

            {
                return UserName = userName;
            }

            [WebMethod(EnableSession = true)]
            public string GetUser()
            {
                    return UserName;           
            }

            private string UserName
            {
                get
                {
                    return Session[Consts.UserNameKey].ToString();
                }
                set
                {
                    Session[Consts.UserNameKey] = value;
                }
            }

     

    when I test these methods (SetUser, then GetUser) through browser via local ASP.NET Server and then on IIS, it works right.

    I created browser-enabled InfoPath form and call SetUser with InfoPath function userName() parameter value and then call GetUser in Form Open rules set.

    In preview mode it also works right, but when I deploy form into Office Forms Server, GetUser returns "Object reference not set to an instance of an object".

    What I need to correct here?

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.