Problem in maintaining session in web services and Infopath - InfoPath Dev
in

InfoPath Dev

Problem in maintaining session in web services and Infopath

Last post 11-05-2008 08:51 AM by guptasourav. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-05-2008 06:33 AM

    Problem in maintaining session in web services and Infopath

    I am having an issue while maintaining Sessions in Web Services and Infopath.

    This is a test web method to set session values

    [WebMethod(EnableSession = true)]
            public void Setvalue()
            {
                  Session["groupID"] = 123456;          
            }

     [WebMethod(EnableSession = true)]
            public Int64 Getvalue()
            {
                return Convert.ToInt64(Session["groupID"]);
            }

    I am using a Web Service Application project to run this. It works fine when I run the application from .Net IDE. But when I try to browse it from ITENMGR or call the same web Method from Infopath it gives me an error of "Object ref not set to an instance of an object". I even tried to publish the web application but it does not work for me.
    I tried to investigate this further and found that it the breakpoint does not stops at Session_Start and Application_Start in Global.asax file while browsing the service from INETMGR meaning the session object is not initialized. On the other hand when I run the application from .NET IDE, breakpoint hits the Session_Start function in Global.asax.

    I know this is wierd but please guide me if I am doing some thing wrong.

    Thanks
    Sourav
  • 11-05-2008 08:51 AM In reply to

    Re: Problem in maintaining session in web services and Infopath

     I got it this is because of WSS 3.0. My virtual directory which calls the web service is under SharePoint - 80. Therefore it overwrites the setting in Web service project. When I try to create a new virtual directory under Default Web Site it works fine.

    Do anyone know how can I configure WSS 3.0  SharePoint - 80 to enable sessions.

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