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 / November 2003

Tip: Looking for answers? Try searching our database.

web service lifetime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert Pfeffer - 04 Nov 2003 21:10 GMT
I created a very simple web service test on my local
machine (the web service and the web server on local).

The web service has two methods.  One method is called
connect it connects to an odbc data source, loads a
dataset using a dataadapter.

The second method returns the dataset loaded by the first.

I created a simple web page that has 2 text fields for a
user name and password and a button.  when the button is
pressed the first method of the service is invoked
passing the user name and password.  The 1st method does
its job and loads the dataset.

The second method is then invoked to retrieve the
dataset.  The second method always has and returns a
dataset with no rows.  1700 rows were there when the
first method exitted.

Do web service instances persist there local data between
invocations of their various methods?
thank you for your help.
Michael Per - 05 Nov 2003 02:22 GMT
web services are stateless so every method call creates new instance.
MSFT - 05 Nov 2003 03:00 GMT
Yes, I agree with Michael. Web service is stateless. Even you have two
method in one web service, they are called for different request and from
differenct instance. When your call first web method, a instance will be
created on server and handle your request.; when you call second web
method, another instance will be create to handle it. both of these
instance don't share the dataset. I think you may return the dataset from
one web method instead of two.

Hope this help,

Luke
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Robert Pfeffer - 05 Nov 2003 19:11 GMT
Thank you for your responses.  I thought that is what
happened, but searching msdn documentation is sometimes
time consuming, and did not answer my question.

Again, thanks everyone for your responses.

>-----Original Message-----
>Yes, I agree with Michael. Web service is stateless. Even you have two
[quoted text clipped - 15 lines]
>
>.

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.