How to use WebService session in C# Windows Forms?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sfreak
    New Member
    • Mar 2010
    • 64

    #1

    How to use WebService session in C# Windows Forms?

    Hi,

    Im running a test of performance between WCF and WEBSERVICES and im trying to setup the same things in both technologies. My WCF server works fine (except Circular Reference issues working with Entity Framework and stuffs like that but its not the case here) and now im trying to setup a WebService to learn how Session works in Windows Forms. Ive seen examples for ASP.NET using the class COOKIECONTAINER but i cant figure out how it works in Windows Forms. I would like to recover a state of an object just like the WCF provides me with sessions.

    Is this possible? If yes, what is the best approach for this case?

    Thanks in advance,

    Fernando Mello
  • Sfreak
    New Member
    • Mar 2010
    • 64

    #2
    Ok here I go...

    I just discovered WHERE I declare a WEB REFERENCE in Visual Studio 2010 using Windows Forms... because when you start an ASP.NET application the option appears when you right click on REFERENCES. When you start an Windows Forms application you must add a SERVICE REFERENCE and then click on ADVANCED button to select the WEB REFERENCE. From now on you can use the session just the way you use in asp.net pages setting the cookiecontainer and retrieving the states of objects you might use in your application. Even i didnt get any answer I supposed that was important to share the answer here.

    Thanks anyway,

    Fernando Mello

    Comment

    Working...