Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Next Newbie Web Service Question
Message
De
21/07/2007 12:43:43
 
 
À
21/07/2007 02:18:37
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Divers
Thread ID:
01242514
Message ID:
01242560
Vues:
25
Kevin G ... Statics in a Web Service class? Um, nope, not a good idea. You need to get off those sinus meds. <g>

Kevin M ... Web Services are just like any other "web" stuff in that they are stateless. You can't set a variable and expect it to stay that way the next time you check. You're already returning the bool from the call to the Login() Web Method. You need to keep track of that some other way in your UI (and pass that bool around to subsequent Web Method calls if you need to).

~~Bonnie


>Hey, Kevin,
>
>My head is a little whoozy from sinus meds, but I'll take a crack at this - you haven't created a property, you've only created a member variable. Depending on how you're instantiating your web service, that variable is going to be reset every time. Not sure how you're calling the function and how you've got this all set up, but you may need to create that variable as a true property and maybe even make it static. Anyway, that's probably the reason it's being set back to false. If that doesn't help, let me know. (maybe you can also post the code that's calling the web service)
>
>Kevin
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform