473,761 Members | 6,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web service session in winform client

hi all

got a questoin here, I have a winform client to call web service and the web
service functions have EnableSession =ture, use IE to test the web service
session, it works, but how to get it to work in winform? it seems like every
call to the service will start a new session even if the web service object
is a global variable in the winform.
kevin

Nov 23 '05 #1
2 6027

"Kevin Yu" <ko**@hotmail.c om> wrote in message
news:ua******** ******@TK2MSFTN GP10.phx.gbl...
hi all

got a questoin here, I have a winform client to call web service and the
web
service functions have EnableSession =ture, use IE to test the web service
session, it works, but how to get it to work in winform? it seems like
every
call to the service will start a new session even if the web service
object
is a global variable in the winform.


To enable session state, the consumer must create a CookieContainer object
and assign it to the CookieContainer property of the Web Service proxy. For
more information check out (watch for the wrap)
http://msdn.microsoft.com/library/de...ainertopic.asp

Regards,
Sami
Nov 23 '05 #2
Thanks Sami
"Sami Vaaraniemi" <sa**********@p leasejippii.fi> wrote in message
news:e$******** *******@TK2MSFT NGP12.phx.gbl.. .

"Kevin Yu" <ko**@hotmail.c om> wrote in message
news:ua******** ******@TK2MSFTN GP10.phx.gbl...
hi all

got a questoin here, I have a winform client to call web service and the
web
service functions have EnableSession =ture, use IE to test the web service session, it works, but how to get it to work in winform? it seems like
every
call to the service will start a new session even if the web service
object
is a global variable in the winform.
To enable session state, the consumer must create a CookieContainer object
and assign it to the CookieContainer property of the Web Service proxy.

For more information check out (watch for the wrap)
http://msdn.microsoft.com/library/de...ainertopic.asp
Regards,
Sami

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2209
by: Tom | last post by:
hello question 1: I have the following code below but the funny thing is that Session only works when I invoke it from the server side.. When I call this session from client (winform app) I don't get an inrementation instead only 0... I don't know why.. question 2:
17
5060
by: Jeremy Chapman | last post by:
I've seen apps where if a windows exe form is running, it publishes a web service. There is no IIS folders or virtual directories required. Does anyone have information on how to do this?
7
4390
by: Stan | last post by:
I need to attach to aspnet_wp.exe in order to debug a web serivice from WinForm client. Why don't I have to do this for ASP.NET / WebForm client? Why doesn't VS.NET debugger attaches automatically? Can I configure it? Thanks, -Stan
0
5215
by: David Palau | last post by:
We have a internal company WinForms application that makes some calls out to a intranet web service (once at application start-up for some configuration info and then periodically during the life of the application for specific functional requests). We are getting System.Net.WebException with HTTP 401: Access Denied errors periodically when we are attempting some functional web service calls. However, immediately trying the web service...
5
1918
by: benjamin_kohler | last post by:
hi, if have the following scenario: I have a winform client which communicates with a web service method that supports session (EnableSession=true), so a cookie is created for this client after the first call of this method. Then the web service session should be migrated to a different machine (running the same web service). The next time the winform-client(using a cookiecontainer for collecting the cookie for the session) should...
5
4162
by: vthakur | last post by:
Hello: I have a Axis Web Service that sets the sessionid in the SOAP header for persisting the session. The client is a .Net client that processes the header as an Unknown Header. It sets the session id received from the Service request on subsequent requests to the service. However the Axis Web service does not process the SOAP header received from the .Net client and creates a new session id for each request from the .Net client. Below...
0
1072
by: yao | last post by:
there are two web method in my web service. bool verifyUser(string user, string pwd) DataSet GetData() that I need connect the web service by WinForm, I hope the client is verified by server by the verifyUser() ,and then it is allowed to execute the GetData() method. I think winform can't use Session object or Cookie for managing session state, are there any good solutions for this?
6
3990
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public string UID; public string PWD; }
11
3658
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each method has the WebMethodAttribute.EnableSession set to true. When I run the test page the session is maintained. However, using a console application, in between setting the string value and attempting to
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7332
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.