Click here to Skip to main content
15,922,155 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Javascript Proxy communication Pin
Bradml1-Dec-06 16:32
Bradml1-Dec-06 16:32 
GeneralRe: Javascript Proxy communication Pin
Richard Andrew x641-Dec-06 16:34
professionalRichard Andrew x641-Dec-06 16:34 
GeneralRe: Javascript Proxy communication Pin
Richard Andrew x641-Dec-06 16:38
professionalRichard Andrew x641-Dec-06 16:38 
GeneralRe: Javascript Proxy communication Pin
Bradml1-Dec-06 16:54
Bradml1-Dec-06 16:54 
GeneralRe: Javascript Proxy communication Pin
RichardGrimmer2-Dec-06 7:08
RichardGrimmer2-Dec-06 7:08 
GeneralRe: Javascript Proxy communication Pin
Shog94-Dec-06 11:16
sitebuilderShog94-Dec-06 11:16 
QuestionCaching and State Management within WebServices Pin
RadioButton1-Dec-06 11:01
RadioButton1-Dec-06 11:01 
AnswerRe: Caching and State Management within WebServices Pin
Dominic Pettifer1-Dec-06 14:07
Dominic Pettifer1-Dec-06 14:07 
While State Management IS supported, it's generally not a recommended practice to implement it with web services due to scalability and practical reasons. Also you need to make sure that whatever is calling it also supports state management, typically via HTTP Cookies.

You implement it like this...

[WebMethod(EnableSession=true)]<br />
public Object DoSomething(){}


Then, providing you're deriving from System.Web.Services.WebService, you use Session same way you use it in ASP.NET web pages. However, if the caller doesn't support stateful webservice, then the Session values will be emptied with every call. If the caller is also a .NET app then enabling stateful Web Service support is entirely possible, write back and I'll post some code.

As for Caching, yes this is possible and recommended. You could do this manually using the Cache property of System.Web.Services.WebService (same way as ASP.NET web pages), or get the WebService to handle Caching itself like this...

[WebMethod(CacheDuration=600)]<br />
public Object DoSomething(){}


This will cache the output of the web service for 10 minutes (600 seconds). It's also intelligent enough to detect input parameters in the WebMethod and Cache different outputs depending on the input params. Although if lots a input params are used, you could end up caching lots of data and flooding the servers memory, so be careful.

Dominic Pettifer

Blog: www.dominicpettifer.co.uk

GeneralRe: Caching and State Management within WebServices Pin
RadioButton4-Dec-06 3:51
RadioButton4-Dec-06 3:51 
QuestionSMS Website Pin
Ashish Porwal30-Nov-06 20:15
Ashish Porwal30-Nov-06 20:15 
AnswerRe: SMS Website Pin
Bradml30-Nov-06 20:40
Bradml30-Nov-06 20:40 
AnswerRe: SMS Website Pin
Vasudevan Deepak Kumar1-Dec-06 21:08
Vasudevan Deepak Kumar1-Dec-06 21:08 
QuestionIE7 and session state Pin
Fred_Smith30-Nov-06 12:38
Fred_Smith30-Nov-06 12:38 
AnswerRe: IE7 and session state Pin
George L. Jackson30-Nov-06 15:25
George L. Jackson30-Nov-06 15:25 
GeneralRe: IE7 and session state Pin
Fred_Smith30-Nov-06 22:20
Fred_Smith30-Nov-06 22:20 
GeneralRe: IE7 and session state Pin
George L. Jackson30-Nov-06 22:44
George L. Jackson30-Nov-06 22:44 
GeneralRe: IE7 and session state Pin
Fred_Smith30-Nov-06 23:49
Fred_Smith30-Nov-06 23:49 
GeneralRe: IE7 and session state Pin
Fred_Smith1-Dec-06 0:10
Fred_Smith1-Dec-06 0:10 
GeneralRe: IE7 and session state Pin
Dominic Pettifer1-Dec-06 14:12
Dominic Pettifer1-Dec-06 14:12 
GeneralRe: IE7 and session state Pin
Fred_Smith2-Dec-06 0:37
Fred_Smith2-Dec-06 0:37 
GeneralRe: IE7 and session state Pin
Fred_Smith3-Dec-06 13:18
Fred_Smith3-Dec-06 13:18 
QuestionPERL - reading from a file Pin
xoxoxoxoxoxox30-Nov-06 12:19
xoxoxoxoxoxox30-Nov-06 12:19 
QuestionPassword Expiration in Asp.Net Logins Pin
alyagalal30-Nov-06 3:18
alyagalal30-Nov-06 3:18 
AnswerRe: Password Expiration in Asp.Net Logins Pin
ednrgc5-Dec-06 6:12
ednrgc5-Dec-06 6:12 
QuestionASP.net Web Service & InfoPath Forms Pin
lyntonS29-Nov-06 23:01
lyntonS29-Nov-06 23:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.