Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2006

Tip: Looking for answers? Try searching our database.

migration of web service session

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
benjamin_kohler@yahoo.de - 15 Feb 2006 19:42 GMT
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 communicate with the session of the
web service which is now running on a different machine.
How can i realize this with C#?
Thanks, for any ideas!

bkohler
Josh Twist - 16 Feb 2006 07:57 GMT
You can share sessions between servers (in order to support web farms)
either by using out-of-process session or SqlServer session:

http://www.codeproject.com/aspnet/ASPNETSession.asp
http://msdn2.microsoft.com/en-us/library/ms178586.aspx (.NET 2 but I
think it works the same/similar)

Josh
http://www.thejoyofcode.com/
Josh Twist - 16 Feb 2006 08:18 GMT
You can share sessions between servers (in order to support web farms)
either by using out-of-process session or SqlServer session:

http://www.codeproject.com/aspnet/ASPNETSession.asp
http://msdn2.microsoft.com/en-us/library/ms178586.aspx (.NET 2 but I
think it works the same/similar)

Josh
http://www.thejoyofcode.com/
bkohler - 16 Feb 2006 13:30 GMT
thanks josh,
but i dont want to store the session central on a different
process/machnie(Out of proc/SQL Server), but within the memory of the
web server (InProc mode). Is it possible to access the session objects
by c#. And is it even possible to delete/create a certain session
object on the web server by code?

Thanks,
bkohler

Josh Twist schrieb:

> You can share sessions between servers (in order to support web farms)
> either by using out-of-process session or SqlServer session:
[quoted text clipped - 5 lines]
> Josh
> http://www.thejoyofcode.com/
Josh Twist - 16 Feb 2006 14:16 GMT
Hi bkohler,

I have no idea why you'd want to do this so maybe I'm not understanding
you correctly. Is your requirement something like this fictional one?

Imagine you have a two servers. One is used for shopping and one used
for checkout so you redirect them to http://server2/checkout.aspx when
they're ready to make a purchase or two. You now need to copy across
the session state from server1 otherwise you have no idea what is in
the user's basket? So you need some mechanism for server2 to
copy/clone/steal/borrow the session from Server1?

If it is, I can't think of any obvious solutions without you
implementing your own session mechanism. Also, the domain is different
so the session cookie wouldn't be the same, otherwise I'd suggest using
out-of-proc as above.

I guess the next obvious question is, why do you need to do this?

Josh
http://www.thejoyofcode.com/
bkohler - 16 Feb 2006 15:27 GMT
josh,
thanks for the quick reply.
well my idea is to migrate the state of a 'web service instance' from
one machine to a remote machine(e.g. in a different network).  a 'web
service instance' is a web service within a session, which has a
certain state. Therefore my idea was to migrate the web service
instance on a new machine. Therefore  the session should be removed on
the old machine after migration. And afterwards the client should
communicate  with the web service on the new macine. I know that the
cookie will be unvalid, but how can i handle it to reach the web
service instance with its state on the new machine?
Any ideas?

bkohler

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.